Forge Home

nrpe

NRPE installation & management module for CentOS/Ubuntu/AWS Linux

14,189 downloads

9,231 latest version

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

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 1.3.1 (latest)
  • 1.3.0
  • 1.2.8
  • 1.2.7
  • 1.2.6
  • 1.2.5
  • 1.2.4
  • 1.2.3
  • 1.2.2
  • 1.1.1
  • 1.1.0
  • 1.0.1
  • 1.0.0
released Jul 3rd 2015
This version is compatible with:
  • , ,

Start using this module

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

Add this module to your Puppetfile:

mod 'proletaryo-nrpe', '1.3.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add proletaryo-nrpe
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install proletaryo-nrpe --version 1.3.1

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.

Download

Documentation

proletaryo/nrpe — version 1.3.1 Jul 3rd 2015

puppet-nagios-nrpe

This module automates the installation/management of the NRPE agent for Nagios/Opsview.

Tested to work on 32-bit/64-bit:

  • Amazon AWS Linux
  • CentOS 6.x
  • Ubuntu 12.04

Parameters

  • allowed_hosts: required, an array of allowed IPs that can connect to this NRPE instance
  • ensure: optional, running or stopped, default=running
  • enable: optional, boolean, default=true
  • dont_blame_nrpe: optional, boolean, default=false (dont_blame_nrpe=0), toggle the dont_blame_nrpe config to enable/disable argument passing to check commands
  • opsview_use: optional, boolean, default=false, define basic check commands with arguments enabled, you have to set dont_blame_nrpe=true to make this work
  • service_check_command: optional, default={}, a hash containing the additional command definitions e.g. { 'command_name' => '/path/to/it ARG' }

Usage

Basic:

class { 'nrpe':
  allowed_hosts => [ "192.168.56.9", "10.10.10.23", ],
}

Modify the behaviour of the NRPE service:

class { 'nrpe':
  allowed_hosts => [ "192.168.56.9", "10.10.10.23", ],
  ensure => running,
  enable => false,
}

If you want to add custom service check commands:

class { 'nrpe':
  allowed_hosts         => [ "192.168.56.9", "10.10.10.23", ],
  ensure                => running,
  enable                => false,
  service_check_command => {
    'check_mem'  => '/usr/local/nagios/plugins/check_mem 40 60',
    'check_blah' => '/usr/local/nagios/plugins/check_blah arg1 arg2',
  },
}

Example above will create the following in /etc/nagios/nrpe.cfg:

command[check_mem]=/usr/local/nagios/plugins/check_mem 40 60
command[check_blah]=/usr/local/nagios/plugins/check_blah arg1 arg2

If you use Opsview, you might want to enable argument passing and some default check commands:

class { 'nrpe':
  allowed_hosts         => [ "192.168.56.9", "10.10.10.23", ],
  ensure                => running,
  enable                => true,
  dont_blame_nrpe       => true,
  opsview_use           => true,
  service_check_command => {
    'check_mem'  => '/usr/local/nagios/plugins/check_mem 40 60',
  }
}

opsview_use => true

This will enable the following check commands in /etc/nagios/nrpe.cfg:

command[check_users]=<%= libpath %>/nagios/plugins/check_users $ARG1$
command[check_disk]=<%= libpath %>/nagios/plugins/check_disk $ARG1$
command[check_procs]=<%= libpath %>/nagios/plugins/check_procs $ARG1$
command[check_load]=<%= libpath %>/nagios/plugins/check_load $ARG1$
command[check_swap]=<%= libpath %>/nagios/plugins/check_swap $ARG1$

Note: You have to set dont_blame_nrpe => true for this to work properly.

Dependencies

For RHEL based distributions.