FAQ
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.

Search Discussions

  • Brian Gupta at Jun 19, 2012 at 12:37 am

    On Mon, Jun 18, 2012 at 10:22 AM, Wendell Araujo 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 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 at Jun 19, 2012 at 9:17 am
    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
    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 at Jun 19, 2012 at 9:31 am
    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 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
    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.

    --
    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 at Jun 19, 2012 at 10:24 am
    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 at Jun 19, 2012 at 9:57 am
    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 at Jun 23, 2012 at 4:18 pm
    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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedJun 18, '12 at 2:25p
activeJun 23, '12 at 4:18p
posts7
users6
websitepuppetlabs.com

People

Translate

site design / logo © 2022 Grokbase