Report format
Puppet 6 generates report format 11.
Puppet::Transaction::Report
Property | Type | Description |
---|---|---|
host |
string | The host that generated this report. |
time |
datetime | When the Puppet run began. |
logs |
array | Zero or more Puppet::Util::Log objects. |
metrics |
hash | Maps from string (metric category) to
Puppet::Util::Metric . |
resource_statuses |
hash | Maps from resource name to Puppet::Resource::Status
|
configuration_version |
string or integer | The configuration version of the Puppet run. This is a string for user-specified versioning schemes. Otherwise it is an integer representing seconds since the Unix epoch. |
transaction_uuid |
string | A UUID covering the transaction. The query parameters for the catalog retrieval include the same UUID. |
code_id |
string | The ID of the code input to the compiler. |
job_id |
string, or null | The ID of the job in which this transaction occurred. |
catalog_uuid |
string | A primary server generated catalog UUID, useful for connecting a single catalog to multiple reports. |
server_used |
string | The name of the primary server used to compile the catalog. If failover
occurred, this holds the first primary server successfully contacted. If this run
had no primary server (for example, a puppet apply run), this field
is blank. |
report_format |
string or integer |
"11" or 11
|
puppet_version |
string | The version of the Puppet agent. |
status |
string | The transaction status: failed , changed , or unchanged . |
transaction_completed |
Boolean | Whether the transaction completed. For instance, if the transaction had an
unrescued exception, transaction_completed = false . |
noop |
Boolean | Whether the Puppet run was in no-operation mode when it ran. |
noop_pending |
Boolean | Whether there are changes that were not applied because of no-operation mode. |
environment |
string | The environment that was used for the Puppet run. |
corrective_change |
Boolean | True if a change or no-operation event in this report was caused by an unexpected change to the system between Puppet runs. |
cached_catalog_status |
string | The status of the cached catalog used in the run: not_used ,
explicitly_requested , or on_failure . |
Puppet::Util::Log
Property | Type | Description |
---|---|---|
file |
string | The path and filename of the manifest file that triggered the log message. This property is not always present. |
line |
integer | The manifest file's line number that triggered the log message. This property is not always present. |
level |
symbol | The severity level of the message :debug ,
:info , :notice , :warning ,
:err , :alert , :emerg ,
:crit . |
message |
string | The text of the message. |
source |
string | The origin of the log message. This could be a resource, a property of a resource, or the string "Puppet". |
tags |
array | Each array element is a string. |
time |
datetime | The time at which the message was sent. |
Puppet::Util::Metric
A Puppet::Util::Metric
object represents all the metrics in a single
category.
Property | Type | Description |
---|---|---|
name |
string | Specifies the name of the metric category. This is the same as the key
associated with this metric in the metrics hash of the
Puppet::Transaction::Report . |
label |
string | The name of the metric formatted as a title. Underscores are replaced with spaces and the first word is capitalized. |
values |
array | All the metric values within this category. Each value is in the form
[name, label, value] , where name is the
particular metric as a string, label is the metric name formatted
as a title, and value is the metric quantity as an integer or a
float. |
The metrics that appear in a report are part of a fixed set and arranged in the following categories:
time
- Includes a metric for every resource type for which there is at least one resource
in the catalog, plus two additional metrics:
config_retrieval
andtotal
. Each value in thetime
category is a float.In an inspect report, there is an additional
inspect
metric. resources
- Includes the metrics
failed
,out_of_sync
,changed
, andtotal
. Each value in theresources
category is an integer. events
- Includes up to five metrics:
success
,failure
,audit
,noop
, andtotal
.total
is always present; the others are present when their values are non-zero. Each value in theevents
category is an integer. changes
- Includes one metric,
total
. Its value is an integer.
Note: Failed reports contain no metrics.
Puppet::Resource::Status
A Puppet::Resource::Status
object represents the status of a single
resource.
Property | Type | Description |
---|---|---|
resource_type |
string | The resource type, capitalized. |
title |
title | The resource title. |
resource |
string | The resource name, in the form Type[title] . This is always the
same as the key that corresponds to this Puppet::Resource::Status
object in the resource_statuses hash. Deprecated. |
provider_used |
string | The name of the provider used by the resource. |
file |
string | The path and filename of the manifest file that declared the resource. |
line |
integer | The line number in the manifest file that declared the resource. |
evaluation_time |
float | The amount of time, in seconds, taken to evaluate the resource. Not present in inspect reports. |
change_count |
integer | The number of properties that changed. Always 0
in inspect reports. |
out_of_sync_count |
integer | The number of properties that were out of sync. Always 0 in inspect reports. |
tags |
array | The strings with which the resource is tagged. |
time |
datetime | The time at which the resource was evaluated. |
events |
array | The Puppet::Transaction::Event objects for the
resource. |
out_of_sync |
Boolean | True when out_of_sync_count > 0 , otherwise false.
Deprecated. |
changed |
Boolean | True when change_count > 0 , otherwise false.
Deprecated. |
skipped |
Boolean | True when the resource was skipped, otherwise false. |
failed |
Boolean | True when Puppet experienced an error while evaluating this resource, otherwise false. Deprecated. |
failed_to_restart |
Boolean | True when Puppet experienced an error while trying to restart this resource, for example, when a Service resource has been notified from another resource. |
containment_path |
array | An array of strings; each element represents a container (type or class) that, together, make up the path of the resource in the catalog. |
Puppet::Transaction::Event
A Puppet::Transaction::Event
object represents a single event for a single
resource.
Property | Type | Description |
---|---|---|
audited |
Boolean | True when this property is being audited, otherwise false. True in inspect reports. |
property |
string | The property for which the event occurred. This value is missing if the provider errored out before it could be determined. |
previous_value |
string, array, or hash | The value of the property before the change (if any) was applied. This value is missing if the provider errored out before it could be determined. |
desired_value |
string, array, or hash | The value specified in the manifest. Absent in inspect reports. This value is missing if the provider errored out before it could be determined. |
historical_value |
string, array, or hash | The audited value from a previous run of Puppet, if known. Otherwise nil. Absent in inspect reports. This value is missing if the provider errored out before it could be determined. |
message |
string | The log message generated by this event. |
name |
symbol | The name of the event. Absent in inspect reports. |
status |
string | The event status:
|
redacted |
Boolean | Whether this event has been redacted. |
time |
datetime | The time at which the property was evaluated. |
corrective_change |
Boolean | True if this event was caused by an unexpected change to the system between Puppet runs. |
Changes since report format 8
Most of report format 11 is backwards compatible with previous versions, but includes the following changes:
- Version 8:
transaction_completed
was added toPuppet::Transaction::Report
- Version 9:
provider_used
was added toPuppet::Resource::Status
- Version 10:
failed_to_restart
was added toPuppet::Resource::Status
- Version 11:
server_used
was added toPuppet::Transaction::Report
For more information, see the report schema.