aswen/nagios-plugins — pull request #8 by markruys (2013-12-09 08:22:07+00:00)
Title: Issue warning when catalog is too old

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. Proposed a fix so it issues a warning after -w WARNING seconds.