Skip to content

A puppet module for managing the server and clients of a nagios setup

License

Notifications You must be signed in to change notification settings

NERC-CEH/puppet-nagios

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nagios

Overview

This is the nagios module, it allows you to create an instance of nagios and then monitor nodes which have exported resources in your puppetdb

Module Description

This nagios module is designed to do as little as possible in setting up a nagios node. It will set up an instance of nagios3 and then you are free to set up whatever nagios monitoring you like using the build in puppet resources for managing nagios configuration files. Specifically:

For details on how to set up nagios monitoring please view the nagios documentation.

This module is very lightweight and only has one dependency on puppetlabs/concat module

Usage

To create a nagios monitoring node which will gather exported resources from other nodes

include nagios::server

nagios::user { 'nagiosadmin' : cryptpasswd : '$apr1$rNDzDZKH$oVGEb0BU6QZ338EuB9Hob.', # Password in htpasswd format }

On another node in your puppet setup

@@nagios_host {'myhost':
   ...
}

If you do not which to use exported resources, you can manage your entire nagios infrastructure on a single node

include nagios::server

nagios::user { 'nagiosadmin' :
   cryptpasswd : '$apr1$rNDzDZKH$oVGEb0BU6QZ338EuB9Hob.', # Password in htpasswd format
}

nagios_host {'myhost':
   ...
}

To set up nrpe services on a client node declare the nagios::client class. This will install the nrpe_nagios plugins and allow access to any defined nrpe service from your nagios server

class {'nagios::client' :
    nagios_server => '192.168.0.1',
}

nagios::nrpe { 'check_users' :
    command             => '/usr/lib/nagios/plugins/check_users -w 5 -c 10',
    notification_period => '24x7',
    service_description => 'Current Users',
    host_name           => $fqdn,
    use                 => 'generic-service',
}

Limitations

This module has been tested with ubuntu 12.04 lts as a server and the following as nrpe clients:

  • Mac OS X 10.9
  • Ubuntu 12.04 LTS
  • Ubuntu 14.04 LTS
  • CentOS 6.5

Contributors

Christopher Johnson - [email protected]

About

A puppet module for managing the server and clients of a nagios setup

Resources

License

Stars

Watchers

Forks

Packages

No packages published