Peter Berghold wrote: > Has anybody out there written a custom check for Nagios to determine > if puppetd and/or puppetmasterd is running? I am considering writing > one if not.
FWIW, I've got an overengineered check_puppet and puppetstatus tool at: http://tmz.fedorapeople.org/scripts/puppetstatus/ I have found it necessary to disable puppet for a short time to work on something and not have puppet helpfully undo my work more than a few times. While it's easy to use puppetd --disable to prevent puppet from running, it's also easy to forget to re-enable it. Or worse, in a place with multiple SA's, it's easy for someone else to come along and notice puppetd seems to be 'stuck' and 'helpfully' clear out the lock file. Using 'sudo puppetstatus -d "Testing some foo"' creates the lock file as puppetd --disable would, but adds the text given and the username of the person disabling puppet. That then shows up in nagios and if puppet remains disabled for longer than check_puppet would normally consider a critical amount of time, it remains a warning if there is a reason in the lockfile. That also lets other SA's know puppet is down intentionally so they don't have to bug me or worry about 'fixing' it. (The checks in the script to chide folks running it as root are more of a goof, to gently prod admins in the habit of doing everything as root to stop that. :) (Oh, and this is in python -- sorry to any ruby lover's who might take offense. I'll try to turn a blind eye to gems and vendor/ dirs if you don't complain to much about my python usage.) -- Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ All of us could take a lesson from the weather. It pays no attention to criticism.
pgpABe5qMfujN.pgp
Description: PGP signature