Puppet Scripts - extract-report-issues
I spent a little while digging through the default puppet log types the other day and after reading through a batch of activity logs I whipped up extract-report-issues, a script that can be run on the command line (or daily via cron) and displays a list of errors and warnings from the specified glob of hosts and log files. By default it does all hosts for the current day, we’ve got it running nightly so we can work through the issues each morning. It’s worth noting that sometimes in the output the same failure occurs more than once. This is because puppet retries certain operations - such as retrieving a resource.
There is actually a lot of useful information in the puppet reports. To start with I’ve added a todo item for a script that notes persistent errors (the same issues over two or three runs) that I’ll hopefully get to this month. Maybe.
If you’re running puppet in production you owe it to yourself to turn on reporting and set up some processes around it. While puppet makes it easy to perform action at a distance you still need to close the loop somehow.