Finally got around to checking into this. I needed to actually read the rest api docs:
http://docs.puppetlabs.com/guides/rest_api.html So: #!/bin/bash exit `curl -s --cacert /var/lib/puppet/ssl/certs/ca.pem https://puppet.mycompany.com:8140/production/certificate/ca | grep '500 Internal Server Error' | wc -l` On Wed, Mar 05, 2014 at 10:29:14AM -0500, Christopher Wood wrote: > How do you monitor your apache/passenger-fronted puppetmaster to find out > when it's down? > > As backstory, we have a chaos monkey sort of cron job randomly kill-9'ing > random processes and monit checking services to make sure they stay up. > (Sadly the chaos monkey part probably won't make it into production.) > > The puppet agent seems to exit with a 0 status in some circumstances where > the puppetmaster isn't working, therefore doing a test noop agent run doesn't > help. So far the only way I've figured out to check if my puppetmaster > service is purportedly functioning is: > > [root@cwt1 ~]# cat /usr/local/sbin/monit-check-passenger > #!/bin/bash > exit `curl -k -s https://localhost:8140 | grep '500 Internal Server Error' | > wc -l` > > Unfortunately the above gives me one of these in my syslog each minute, which > is harmless yet still ugly: > > Mar 5 10:21:42 cwt1 puppet-master[32167]: The environment must be purely > alphanumeric, not '' > > I'm interested in a puppetmaster monitoring solution which doesn't give me > log oddities. > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/20140305152914.GA29143%40iniquitous.heresiarch.ca. > For more options, visit https://groups.google.com/groups/opt_out. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20140523202334.GA10353%40iniquitous.heresiarch.ca. For more options, visit https://groups.google.com/d/optout.
