Giter Club home page Giter Club logo

nagios-puppet's Introduction

nagios-puppet

A collection of Nagios scripts/plugins for monitoring Puppet stuff.

License

See the LICENSE file

PLUGINS:

check_pupdash_nodes:

This check is designed to be run against a host that is running the puppet dashboard application. The plugin grabs the index page of the application and parses the results, generating a graph of machines based on their current state:

check_pupdash_nodes

Assuming that your host running the dashboard app is in a hostgroup called 'Puppet Dashboard', an example configuration might resemble this:

define command{
    command_name check_pupdash_nodes
    command_line $USER1$/check_pupdash_nodes -H $HOSTADDRESS$ -p 80
}

define service{
    use                  generic-service-graphed
    service_description  Puppet Dashboard Nodes
    hostgroups           Puppet Dashboard
    check_command        check_pupdash_nodes
}

If the dashboard is running on a port other than port 80, adjust the -p parameter in the command. If your dashboard is behind ssl, add the -s option. If you are using HTTP basic authentication, see the -U, -P and -r options.

check_puppet_comptime:

This check is designed to be run locally on the puppetmaster via NRPE and returns the average catalog compilation time based on the puppetmaster's log.

Example NRPE configuration:

command[check_puppet_comptime]=/usr/bin/sudo /usr/lib64/nagios/plugins/check_puppet_comptime -w 2 -c 3 -f /var/log/messages

Note that because the script is parsing the syslog, you need root access. If you are logging to some other file, then this may not be necessary. To enable nrpe to run this plugin as root, I added the following to my sudoers file:

Cmnd_Alias PUPPET = /usr/lib64/nagios/plugins/check_puppet_comptime *
nrpe  ALL=(ALL)       NOPASSWD: PUPPET

You may also need to comment out Defaults requiretty in your sudoers file". Once you have the NRPE config working, configure the nagios side of things just like you would for any other NRPE check.

nagios-puppet's People

Contributors

jamesloosli avatar jasonhancock avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

nagios-puppet's Issues

check_dashboard returns incorrect OK, if connecting to the wrong site/page

if the response from the host is a valid page, but does not contain any node information, the check will return Dashboard Hosts OK | unresponsive=0;; failed=0;; pending=0;; changed=0;; unchanged=0;; unreported=0;;

found this while testing puppet enterprise, which requires you to log into the system via a form.

need to check that

my %nodes;
foreach my $line(split('\n', $response->decoded_content)) {
    if($line=~m/<a href="\/nodes\/(\w+)">(\d+)<\/a>/) {
        $nodes{$1} = $2;
    }
}

actually processes data

threshold monitoring for check_pupdash_nodes

i've added some code in check_pupdash_nodes to make threshold monitoring possible ;-)
regards
......

get threshold monitoring for nagios/icinga

my $code;
$code = $np->check_threshold(
check => $nodes{'failed'},
warning => 1,
critical => 3,
);
$np->nagios_exit( $code, "Threshold check failed" ) if $code != OK;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.