Wendell Araujo
2012-Jun-18 14:22 UTC
[Puppet Users] Service Puppetmaster being monitored by Nagios
Good morning! I have a server running Nagios and would like to monitor the service in my puppet server puppetmaster. Has anyone managed to do this? grateful Wendell -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Brian Gupta
2012-Jun-19 00:37 UTC
Re: [Puppet Users] Service Puppetmaster being monitored by Nagios
On Mon, Jun 18, 2012 at 10:22 AM, Wendell Araujo <johnnatah.araujo@gmail.com> wrote:> Good morning! > > I have a server running Nagios and would like to monitor the service in my > puppet server puppetmaster. Has anyone managed to do this? > > grateful > > WendellSo this doesn''t exactly answer your question, but it is a pattern that may be of use. So we push out a managed file to all clients that gets updated everytime we make a commit to the puppetcode base (git post commit hook), and have a corresponding nagios check that confirms that the version of the file on the puppet master is the same as on the client. This tells us if anything is broken in the loop, including a nonfunctional puppetmaster.> > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en.-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Andreas Paul
2012-Jun-19 09:16 UTC
Re: [Puppet Users] Service Puppetmaster being monitored by Nagios
I''m not sure if he wants to monitor the puppet runs on the clients. Maybe he wants to monitor if the the puppetmaster is available or not, so /usr/lib/nagios/plugins/check_tcp -H YOURPUPPETMASTER -p 8140 TCP OK - 0.000 second response time on port 8140|time=0.000464s;;;0.000000;10.000000 or /usr/lib/nagios/plugins/check_http -H YOURPUPPETMASTER -p 8140 -S -s "The environment must be purely alphanumeric" -e "HTTP/1.1 400 Bad Request" HTTP OK HTTP/1.1 400 Bad Request - 0.009 second response time |time=0.009472s;;;0.000000 size=271B;;;0 would be a good start. On Tuesday, June 19, 2012 2:37:04 AM UTC+2, Brian Gupta wrote:> > On Mon, Jun 18, 2012 at 10:22 AM, Wendell Araujo > <johnnatah.araujo@gmail.com> wrote: > > Good morning! > > > > I have a server running Nagios and would like to monitor the service in > my > > puppet server puppetmaster. Has anyone managed to do this? > > > > grateful > > > > Wendell > > So this doesn''t exactly answer your question, but it is a pattern that > may be of use. So we push out a managed file to all clients that gets > updated everytime we make a commit to the puppetcode base (git post > commit hook), and have a corresponding nagios check that confirms that > the version of the file on the puppet master is the same as on the > client. This tells us if anything is broken in the loop, including a > nonfunctional puppetmaster. > > > > > -- > > You received this message because you are subscribed to the Google > Groups > > "Puppet Users" group. > > To post to this group, send email to puppet-users@googlegroups.com. > > To unsubscribe from this group, send email to > > puppet-users+unsubscribe@googlegroups.com. > > For more options, visit this group at > > http://groups.google.com/group/puppet-users?hl=en. >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/XwIltqb1KuQJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Bernd Adamowicz
2012-Jun-19 09:30 UTC
AW: [Puppet Users] Service Puppetmaster being monitored by Nagios
This might give another starting point: * http://www.bernd-adamowicz.de/180/monitoring-puppet-part-3/ * http://www.bernd-adamowicz.de/85/synchronizing-puppet-generated-icinga-configuration/ Essentially the first link might be helpful. Bernd Von: puppet-users@googlegroups.com [mailto:puppet-users@googlegroups.com] Im Auftrag von Andreas Paul Gesendet: Dienstag, 19. Juni 2012 11:17 An: puppet-users@googlegroups.com Betreff: Re: [Puppet Users] Service Puppetmaster being monitored by Nagios I''m not sure if he wants to monitor the puppet runs on the clients. Maybe he wants to monitor if the the puppetmaster is available or not, so /usr/lib/nagios/plugins/check_tcp -H YOURPUPPETMASTER -p 8140 TCP OK - 0.000 second response time on port 8140|time=0.000464s;;;0.000000;10.000000 or /usr/lib/nagios/plugins/check_http -H YOURPUPPETMASTER -p 8140 -S -s "The environment must be purely alphanumeric" -e "HTTP/1.1 400 Bad Request" HTTP OK HTTP/1.1 400 Bad Request - 0.009 second response time |time=0.009472s;;;0.000000 size=271B;;;0 would be a good start. On Tuesday, June 19, 2012 2:37:04 AM UTC+2, Brian Gupta wrote: On Mon, Jun 18, 2012 at 10:22 AM, Wendell Araujo <johnnatah.araujo@gmail.com<mailto:johnnatah.araujo@gmail.com>> wrote:> Good morning! > > I have a server running Nagios and would like to monitor the service in my > puppet server puppetmaster. Has anyone managed to do this? > > grateful > > WendellSo this doesn''t exactly answer your question, but it is a pattern that may be of use. So we push out a managed file to all clients that gets updated everytime we make a commit to the puppetcode base (git post commit hook), and have a corresponding nagios check that confirms that the version of the file on the puppet master is the same as on the client. This tells us if anything is broken in the loop, including a nonfunctional puppetmaster.> > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com<mailto:puppet-users@googlegroups.com>. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com<mailto:puppet-users%2Bunsubscribe@googlegroups.com>. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en.-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/XwIltqb1KuQJ. To post to this group, send email to puppet-users@googlegroups.com<mailto:puppet-users@googlegroups.com>. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com<mailto:puppet-users+unsubscribe@googlegroups.com>. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Alexander Swen
2012-Jun-19 09:51 UTC
Re: [Puppet Users] Service Puppetmaster being monitored by Nagios
how about this: nagios_command { "check_puppetmaster_https": command_line => ''$USER1$/check_http -SI $HOSTNAME$ -p 8140 -u /production/status/puppetclient --header="Accept: yaml"''; } -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Alexander Swen
2012-Jun-19 09:57 UTC
[Puppet Users] Re: Service Puppetmaster being monitored by Nagios
> > nagios_command { >"check_puppetmaster_https": command_line => ''$USER1$/check_http -SI $HOSTNAME$ -p 8140 -u /production/status/puppetclient --header="Accept: yaml"''; } -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/HUjWFhZenzAJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Todd Zullinger
2012-Jun-23 16:18 UTC
Re: [Puppet Users] Service Puppetmaster being monitored by Nagios
Hi, Wendell Araujo wrote:> I have a server running Nagios and would like to monitor the service > in my puppet server puppetmaster. Has anyone managed to do this?The REST API¹ is very handy for doing this. I use https://$server:8140/production/status/no_key for this. I had to allow this in the auth.conf on 2.6 (which I think is a bug that may be fixed in 2.7). Without an auth.conf, this should be allowed by default. The auth.conf changes: # allow all nodes to access the server status path /status method find allow * The server picks this change up automatically, no need to restart it. This allows a check like this: sudo curl -s -H ''Accept: pson'' \ --cacert /var/lib/puppet/ssl/certs/ca.pem \ --cert /var/lib/puppet/ssl/certs/$fqdn.pem \ --key /var/lib/puppet/ssl/private_keys/$fqdn.pem \ https://$server:8140/production/status/test I use pycurl to wrap this all up in a check that tests that the URL returns the expected out ({"is_alive":true}) and that it does so in reasonable time. I''ve attached that check. If anyone finds this useful and has improvements, feel free to drop me a line or send me a diff. ¹ http://docs.puppetlabs.com/guides/rest_api.html -- Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Profanity is the inevitable linguistic crutch of the inarticulate motherfucker. -- Bruce Sherrod