Forge Home


puppet module for managing puppet monitoring resources


10,042 latest version

1.5 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 1.2.0 (latest)
  • 1.1.8
  • 1.1.7
  • 1.1.6
  • 1.1.5
  • 1.1.4
  • 1.1.3
  • 1.1.2
  • 1.1.1
  • 1.1.0
  • 1.0.7
  • 1.0.6
  • 1.0.5
  • 1.0.4
  • 1.0.3
  • 1.0.2
  • 1.0.1
  • 1.0.0
released Feb 5th 2014

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'rendhalver-monitoring', '1.2.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add rendhalver-monitoring
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install rendhalver-monitoring --version 1.2.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.



rendhalver/monitoring — version 1.2.0 Feb 5th 2014


####Table of Contents

  1. New stuff
  2. Breaking Changes
  3. Bug fixes
  4. Requirements
  5. Overview - What is the monitoring module?
  6. Module Description - What does the module do?
  7. Setup - The basics of getting started with monitoring
  8. Usage - The parameters available for configuration
  9. Implementation - An under-the-hood peek at what the module is doing
  10. Limitations - OS compatibility, etc.
  11. Development - Guide for contributing to the module
  12. Release Notes - Notes on the most recent updates to the module

New stuff

I recently started a consulting company called Abstract IT Pty Ltd. I have transfered ownership of all my puppet modules to a new organisation on Puppet Forge called abstractit. I am making one final release of my modules under rendhalver and abstractit to give you a chance to switch over to the new organisation. I have also added a licence. All my modules will be licenced under Apache v2.

Breaking Changes

As of version 1.1.x $monitoring_service is no longer a class variable monitoring::params $monitoring_type is used to set the server type (icinga or nagios currently) which determines the user and service to notify I have removed some really old files I need to convert so if you were using those let me know. I don't think you would be because they don't work with the current setup.

Bug fixes

fixing some package dependencies for Fedora 19

added a define for creating nagios hostgroups added getting hostgroup set by and ENC or other method that sets $::hostgroup monitoring::params::host_groups can now be an array or a , separated string including sudo in base class as it's needed now including more exported nagios resources

added a few new commands check_http_port_string for checking the existence of a string on a web page check_https_port_string for checking the existence of a string on a https web page added a script so the check_route command has something to run removed a few commands that didn't have scripts


Stored configs on your puppetmaster (I highly recommend using puppetdb with a postgresql backend for this). Hiera is used for getting some variables so a puppet version that supports hiera is required. I have only tested this with puppet 3.x but it should work with 2.7. If anyone has gotten it working in other versions please let me know.


Puppet module for managing monitoring and nagios resources Node resources are exported to a monitoring server

Module Description

Puppet module for managing puppet monitoring resources. The base module sets up a few basic servies to monitor.


what monitoring affects:

  • Not a lot on the node itself most resources are exported
  • On a server node the resources to monitor are put in /etc/nagios/ and can be read by icinga or nagios from there

Beginning with monitoring

This will manage a basic setup for monitoring a node. This will also pull in all the exported resources for a node that is also a monitoring server

include monitoring

Variables that need to be set for monitoring to work These are class params so use hiera or and ENC to set them up easily.

# node that will monitor this node
# Type of the monitoring server (icinga or nagios currently)

Extra params for this node.

# for overriding the host_name of this node, defaults to $fqdn
# for overriding the host_ip of this node, defaults to $ipaddress
# comma separates list of host_groups to add this host to
# parent for this host
# host template to use for this host default is linux_server
# alias to set for this host
# when to check this host
# when to send notifications for this host

Extra params for setting up a notify script for sms alerts. I only have a script for clickatell right now so the defaults set that up.

# name of the script
# this will get used in contact templates 
# template to use for setting up the script
# args to use for the host notify command
# args to use for the service notify command


monitoring::script { "script_name":
  ensure => present, 
  template => undef, 
  file => undef, 
  script_type => 'template',


installs a script in the $monitoring::params::nagios_extra_plugins directory

Parameters within monitoring::script


Whether the script should exist or not default is taken from $monitoring::params::ensure


Location of the template


Full puppet location of the file


Type of the script, template or file

monitoring::command { "command_name":
  command => "command_to_run",
  command_args => '--args', 
  plugin_type => 'main',
  sudo => false, 


Sets up a command on the monitoring server

Parameters within monitoring::command


Whether the script should exist or not default is taken from $monitoring::params::ensure


Command to run.


Args for the command.


Type of plugin.


Whether to enable sudo for the command This sets up an sudo rule on the node for the user the monitoring server runs as (automagically determined)

monitoring::service { "service_name":
  servicegroups => "blah,blah", 
  check_command => 'command!arg1!arg2',
  service_description => 'what it does',


Sets up a command on the monitoring server

Parameters within monitoring::command


Whether the script should exist or not default is taken from $monitoring::params::ensure


servicegroups this command belongs to


command to run for the service check


description for the service


service template to use, default is standard_service


defaults to $monitoring::params::notifications


defaults to $monitoring::params::sms_alerts


defaults to admins


sms contats to append to contact_groups if sms_alerts is true


whether to register the service with the monitoring server


hostname for the serice to check, defaults to $monitoring::params::host_name


monitoring server for the serice to check, defaults to $monitoring::params::monitoring_server


for overriding the default set in the service template


for overriding the default set in the service template


for overriding the default set in the service template


for overriding the default set in the service template


for overriding the default set in the service template

monitoring::net_device { "":
  host_ip => "", 


Sets up a router to monitor

Parameters within monitoring::net_device


Whether the router should be defined. Defaults to true


ip adress of the router


parent of this router


host groups for the router, defaults to network_hardware


alias for the router, defaults to undef


for overriding the defualt 24x7 timeperiod


ping timout warning value for this router


ping timeout critical value for this router


whether to enable notifications, defaults to true


server that monitors this router, defaults to $monitoring::params::monitoring_server


Uses exported resources to specify which services get monitored on this node


Fedora 18 has some issue with importing the services. I think it is an issue with puppet or ruby itself but not completely sure at this stage. While I would it out you will have to delete the nagios_* files on your monitoring server before importing new resources. There may be others. Don't hesitate to let me know if you find any.


All development, testing and releasing is done by me at this stage. If you wish to join in let me know.

Release Notes


Final release for rendhalver-nrpe. First release as abstractit-nrpe. Code cleanups

1.1.8 More Fedora 19 package fixes

1.1.7 Fedora 19 package fixes


fixing stupid error mysql scripts need to be in mysql service class


added monitoring::hostgroup define for creating host groups on the monitoring server including more exported nagios resources


fixing install packages


adding mysql check options and commands


added some missing scripts using validate_re to check monitoring_type


Removed some old files that still need converting to the new format. Silly me has been including them in the forge builds the whole time without realising. Added detailed check scripts for smtp, imap and pop scripts. Added route service


added new type for adding nagios commands this uses my sudo module for adding sudo rules if required

new type for adding extra scripts

new settings for adding sms notification script

new documentation describing how it all works


update to use new format for nrep::plugin


need to install Unix::Lsof via cpan if it isn't installed


adding docs and example node adding a few missing packages


a few fixes and requiring new version of nrpe


fixing reboot service clas


switched back to old way of doing class chaining


adding check_period to params and monitoring::host. Removing references to some old var names. Indentation cleanup


Initial release