Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

What is NRPE?

NRPE or Nagios Remote Plugin Executor provides you a easy method to execute a monitoring plugin on a remote Linux host.

Prepare your openITCOCKPIT server

On your openITCOCKPIT server you only need to install the check_nrpe monitoring plugin.

Navigate to Administration -> Package manager and install the check_nrpe extension:


Install NRPE daemon on the remote host

On the remote host you need to install the NRPE daemon which executes to command on the remote host. The monitoring engine on the openITCOCKPIT Server schedules the execution of the check on the remote host due to NRPE daemon using check_nrpe.

In this example we like to monitor an Ubuntu system so we can install all additional software using the packet manager APT.

apt-get update
apt-get install nagios-nrpe-server

Important NRPE daemon configuration options (remote host)

By default the configuration for NRPE can be found at /etc/nagios/nrpe.cfg

First of all you need to set the ip address of your openITCOCKPIT server. Only this address is able to communicate with NRPE and execute commands


NRPE is able to accept command arguments (parameters) and pass it to the check plugin.

This option is usefull if you work with Servicetemplates provided by openITCOCKPIT. So can easily change parameters on every system you monitor using NRPE without touching nrpe.cfg on the remote host


At the end of the file you can find a set of predefined commands you can now monitor. By default only commands with hard coded command arguments are enabled.

# The following examples use hardcoded command arguments...
command[check_users]=/usr/lib/nagios/plugins/check_users -w 5 -c 10
command[check_load]=/usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
command[check_hda1]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /dev/hda1
command[check_zombie_procs]=/usr/lib/nagios/plugins/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w 150 -c 200

There is also a set of commands available that accept command arguments. As mentioned above, to use command arumgents you need to set dont_blame_nrpe=1

# The following examples allow user-supplied arguments...
command[check_users]=/usr/lib/nagios/plugins/check_users -w $ARG1$ -c $ARG2$
command[check_load]=/usr/lib/nagios/plugins/check_load -w $ARG1$ -c $ARG2$
command[check_disk]=/usr/lib/nagios/plugins/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
command[check_procs]=/usr/lib/nagios/plugins/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$

To apply your changes you need to restart the NRPE daemon

service nagios-nrpe-server restart

check_nrpe quick start (openITCOCKPIT server)

If you have installed check_nrpe via openITCOCKPIT's inbuilt paket manager you can find the plugin at: /opt/openitc/nagios/libexec/check_nrpe

The usage is not that tricky but you should take a look at --help

The main constraints are

-H       => The address of the remote host
-c check_load        => The name of the command you like to execute, defined in the square brackets in nrpe.cfg
-a 15,10,5 30,25,20  => Optional command arguments, if enabled in nrpe.cfg $ARG1$ = 15,10,5 $ARG2$ = 30,25,20

Run a test (openITCOCKPIT server)

After you have installed and configure NRPE we are ready to run the first test and check if everything is working like expected.

Check example with hard coded command arguments:

cd /opt/openitc/nagios/libexec
./check_nrpe -H -c check_users

You should get a output similar like this

USERS OK - 2 users currently logged in |users=2;5;10;0

Check example with dynamic command arguments:

cd /opt/openitc/nagios/libexec
./check_nrpe -H -c check_load -a 15,10,5 30,25,20

You should get a output similar like this

OK - load average: 0.00, 0.06, 0.08|load1=0.000;15.000;30.000;0; load5=0.060;10.000;25.000;0; load15=0.080;5.000;20.000;0; 

Create the command using openITCOCKPIT interface

To create Host and Service checks that use NRPE you need to create a Command and a Servicetemplate. Please read the documentation for more inforamtion.




  • No labels