use client_data/catalog/<fqdn>.json for nagios check?

144 views
Skip to first unread message

Bernard Clark

unread,
Jul 22, 2014, 3:36:14 PM7/22/14
to puppet...@googlegroups.com
We need to be alerted whenever a puppet report from any puppet client is late. We were thinking of having Nagios monitor the last modification time of a client's /var/lib/puppet/client_data/catalog/<fqdn>.json and alert us when that file ages too much. Anyone have a better idea?

Atom Powers

unread,
Jul 22, 2014, 3:48:12 PM7/22/14
to puppet...@googlegroups.com
I use a script that checks if the puppet client is running and parses the lastrunreport for last run time and if any errors were reported applying the catalog.


On Tue, Jul 22, 2014 at 12:36 PM, Bernard Clark <bernie...@gmail.com> wrote:
We need to be alerted whenever a puppet report from any puppet client is late. We were thinking of having Nagios monitor the last modification time of a client's /var/lib/puppet/client_data/catalog/<fqdn>.json and alert us when that file ages too much. Anyone have a better idea?

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/5d8181b7-6911-4af1-95dd-24331425d80e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Perfection is just a word I use occasionally with mustard.
--Atom Powers--

Denmat

unread,
Jul 22, 2014, 6:20:58 PM7/22/14
to puppet...@googlegroups.com

Jason Antman

unread,
Jul 30, 2014, 9:01:48 AM7/30/14
to puppet...@googlegroups.com
I've used two different ways of doing this, depending on whether or not you have this stuff installed/running:
(1) if you have PuppetDB, just use that. I probably have a (Python) check plugin for this somewhere if you need it.
(2) use `mco puppet status` and parse the output of that

These also have the advantage that they can be run as cron'ed passive checks, and submit the results very efficiently.


Brian Wilkins

unread,
Jul 30, 2014, 11:35:15 AM7/30/14
to puppet...@googlegroups.com
We use this one : https://github.com/liquidat/nagios-icinga-checks/blob/master/check_puppetagent

But you have to modify it if you are using an earlier version of Python for the date time code to get the difference.

It's also good if you check the report file for errors. Rather than just the summary. We check both.
Reply all
Reply to author
Forward
0 new messages