NRPE is a way to execute a monitoring plugin on a remote system. It requires, that the NRPE-Server is running and the monitoring plugins are installed on the remote system.
It is recommended to use the openITCOCKPIT Monitoring Agent to execute plugins on a remote host because the setup is way less complex. How ever it's up to you which method you prefer.
Establish an SSH connection to your openITCOCKPIT Server and install the following package:
apt-get install --no-install-recommends nagios-nrpe-plugin
To use the new plugin, you need to create a new command at Objects Commands and press on + New
|Command type||Service check command|
|Command arguemnt ($ARG1)||
To use the
check_nrpe plugin, you also need to create a new service template.
Templates Service templates and press on
Set the container to
/root so the service template will be available for all users. As name we use
|Service Template defenition|
|Enable active checks||Yes|
|Command name (ARG1)||blank|
To use NRPE, it is required that the
nagios-nrpe-server is running on the remote host.
Establish an SSH connection to your remote host and install the following packages:
apt-get install nagios-plugins nagios-nrpe-server
Open the file
/etc/nagios/nrpe.cfg with your favorite editor.
allowed_hosts and add the ip address of your openITCOCKPIT server.
The default configuration comes with some predefined basic checks. We are going to use this example checks right now.
The default configuration will check the disk
/dev/hda1 which doesn’t exist on the most systems anymore... In our case, we replace this with
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_vda1]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /dev/vda1 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
Whenever you change the config, you need to restart
nagios-nrpe-server.service to apply the changes.
systemctl restart nagios-nrpe-server.service
Go to Services and press on + New
First of all you have to select the host you like to create the service for and select the
CHECK_BY_NRPE_SIMPLE service template.
The system will now load all predefined values of the service template.
Change the Service name to
CPU Load and set
check_load as Command name ($ARG1$) and click on Create service
Repeat this step for all defeind NRPE commands. The command names are defined in your
nrpe.cfg on the target host. In this case we have the
default commands which are:
Once you created all services, you need to Refresh monitoring configuration.
Press Launch refresh to apply the new configuration.
The new services will be now monitored by the system:
© 2020 it-novum GmbH - All Rights Reserved