When you run Puppet in the command line, you get detailed output about what was applied to each node. When you run a job or plan in the console, you don’t get as much detailed output. However, you can get the same detailed information on jobs and plans by querying PuppetDB.
Version and installation information
PE version: All supported
This solution requires installing the jq
utility. We cannot provide support for third-party software.
Solution
No matter how the catalog is applied, resources and events are stored in PuppetDB.
For example, to get information about a node whose most recent report contains changes, run the following on the PuppetDB node (the primary server, unless your PuppetDB is on an external node):
puppet query 'reports[resources] { latest_report? = true and certname = "<CERTNAME>" and status = "changed"} ' | jq '.[].resources.data[] | select(.corrective_change == true)'
How can we improve this article?
0 comments
Please sign in to leave a comment.
Related articles