Monitoring an apache/passenger puppetmaster setup?

60 views
Skip to first unread message

Christopher Wood

unread,
Mar 5, 2014, 10:29:14 AM3/5/14
to puppet...@googlegroups.com
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.

Christopher Wood

unread,
May 23, 2014, 4:23:47 PM5/23/14
to puppet...@googlegroups.com
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`
> --
> 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/20140305152914.GA29143%40iniquitous.heresiarch.ca.
> For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages