Forge Home

nrpe

Puppet NRPE module

10,268 downloads

10,101 latest version

4.6 quality score

Version information

  • 0.0.3 (latest)
  • 0.0.2
  • 0.0.1
released Sep 5th 2016
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 'link0-nrpe', '0.0.3'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

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

Manually install this module globally with Puppet module tool:

puppet module install link0-nrpe --version 0.0.3

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
Tags: nagios, nrpe

Documentation

link0/nrpe — version 0.0.3 Sep 5th 2016

link0/puppet-nrpe

Build status License badge Puppet badge

Overview

The link0/nrpe module installs, configures and manages the NRPE service.

Usage

Basic usage accepting all defaults (installation, configuration, managing the service, etcetera)

include ::nrpe

Although, if you would like to have more control over the service, you can pass parameters like this:

class { '::nrpe':
  package_ensure => latest,
  service_manage => false,
}

These settings can also be overridden by using Hiera

nrpe::service_manage: false

Defining commands

This module is all about defining commands to be called remotely.

# This command creates '/etc/nagios/nrpe.d/check_apt.cfg' with the content:
# command[check_apt]=/usr/lib/nagios/plugins/check_apt
nrpe::command { 'check_apt':
}

If you want to add arguments, those can be defined as well

# This command creates '/etc/nagios/nrpe.d/check_procs.cfg' with the content:
# command[check_procs]=/usr/lib/nagios/plugins/check_procs -w 175 -c 200
nrpe::command { 'check_procs':
  arguments => '-w 175 -c 200',
}

You can even specify a custom command, but keep the name NRPE calls

# This command creates '/etc/nagios/nrpe.d/check_foo.cfg' with the content:
# command[check_foo]=/usr/bin/foo -w bar -c baz
nrpe::command { 'check_foo':
  command => '/usr/bin/foo',
  arguments => '-w bar -c baz',
}

Customization

package_manage

Whether the package should be managed by puppet. Type: boolean. Defaults to true eg package_manage: false will not install the package from your package manager

package_ensure

If the package is managed, how to ensure the package, Type: installed, absent or latest. Defaults to installed

package_name

If the package is available under a different name, you can specify it here. Type: string Defaults to nagios-nrpe-server

service_manage

Whether you want puppet to manage the service. Type: boolean, defaults to true

service_ensure

If the service is managed by puppet, what should be ensured. Type: running or stopped. Defaults to running

service_name

If the service is managed by puppet, what the name of the service should be. Type: string Defaults to 'nagios-nrpe-server'.

config_manage

Whether you want puppet to manage nrpe.cfg. Type: boolean, defaults to true

config_file

If the configuration is managed by puppet, which file should be managed. Type: absolute_path. Defaults to /etc/nagios/nrpe.cfg

config_template

If the configuration is managed by puppet, which template should be used. Type: string. Defaults to nrpe/nrpe.cfg.erb

allowed_hosts

Which hosts are allowed to connect to NRPE. Type: array. Defaults to ['127.0.0.1'].

port

Which port should NRPE be listening on. Type: integer. Defaults to 5666.

user

Which user should NRPE be running under. Type: string. Defaults to nagios.

group

Which group should NRPE be running under. Type: string. Defaults to nagios.

pid_file

Which file should be used to store the PID. Type absolute_path. Defaults to /var/run/nagios/nrpe.pid.

log_facility

Which log facility should NRPE be logging to. Type: string. Defaults to daemon.

command_timeout

What timeout should be set for commands. Type: integer. Defaults to 60.

connection_timeout

What timeout should be set for connection issues. Type: integer. Defaults to 300.

debug

Should NRPE be logging debug output. Type: boolean. Defaults to false.