aswen/nagios-plugins — pull request #9 by markruys (2013-12-09 12:15:13+00:00)
Title: Issue warning when last_run_report.yaml contain errors

In case the Puppet agent fails to retrieve a new catalog because of some configuration error, it uses a cached version:

Dec 9 08:55:44 lb2 puppet-agent[21605]: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: ...
Dec 9 08:55:45 lb2 puppet-agent[21605]: Using cached catalog
Dec 9 08:56:03 lb2 puppet-agent[21605]: Finished catalog run in 16.48 seconds

However, check_puppet_agent fails to notice this problem and reports OK. The patch will scan last_run_report.yaml to detect this kind of errors. In case of errors, check_puppet_agent raises a warning with the error message from the report.