Nethence Newdoc Olddoc Lab Your IP BBDock  

Warning: those guides are mostly obsolete, please have a look at the new documentation.


Enabling nagios nrpe scripts on targets (running the nrpe service)
On the target (nrpe server)
Install the NRPE service & plugins, on Debian,
apt-get install \
nagios-nrpe-server \
nagios-nrpe-plugin \
nagios-plugins-basic \
update-rc.d nagios-nrpe-server defaults
on RHEL6 (EPEL is needed),
rpm -ivh epel-release-latest-6.noarch.rpm
yum install \
nrpe \
nagios-plugins-nrpe \
nagios-plugins-disk \
nagios-plugins-load \
nagios-plugins-swap \
nagios-plugins-procs \
nagios-plugins-time \
nagios-plugins-uptime \
chkconfig nrpe on
The provided nagios plugins are installed there:
(Debian) /usr/lib/nagios/plugins/
(RHEL) /usr/lib64/nagios/plugins/
Fetch and authorize additional custom scripts for example there,
(custom) /root/bin/
Check that everything is working locally, calling the scripts/plugins directly e.g.,
(custom) /root/bin/diskusage4nagios.bash
(Debian) /usr/lib/nagios/plugins/check_disk -w 10% -c 5%
(RHEL) /usr/lib64/nagios/plugins/check_disk -w 10% -c 5%
Allow the server to connect and enable the scripts and plugins into NRPE configuration,
cp /etc/nagios/nrpe.cfg /etc/nagios/nrpe.cfg.dist
vi /etc/nagios/nrpe.cfg
allowed_hosts=, NAGIOS_SERVER 
(custom) command[diskusage4nagios]=/root/bin/diskusage4nagios.bash
(custom) command[check_omreport]=/root/bin/omreport.bash
(RHEL) command[disk]=/usr/lib64/nagios/plugins/check_disk -w 10% -c 5%
(RHEL) command[load]=/usr/lib64/nagios/plugins/check_load -r -w 15,10,5 -c 30,25,20
(RHEL) command[swap]=/usr/lib64/nagios/plugins/check_swap -w 90 -c 80
(RHEL) command[memsh]=/usr/lib64/nagios/plugins/ -W 10 -C 20
(RHEL) command[check_memory]=/usr/lib64/nagios/plugins/check_mem -w 80 -c 90
reload the NRPE service, on Debian,
/etc/init.d/nagios-nrpe-server restart
on RHEL,
service nrpe restart
Make sure port TCP 5666 is open or disable the firewall on the system.
On the nagios server (nrpe client)
Check that remote commands executes calling check_nrpe manually,
/usr/lib/nagios/plugins/check_nrpe -H $target
/usr/lib/nagios/plugins/check_nrpe -H $target -c diskusage4nagios
/usr/lib/nagios/plugins/check_nrpe -H $target -c disk
Configure the NRPE global wrapper,
define command{
command_name nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
Configure the host and add the service,
define host{
use generic-host
host_name $target
alias Cliff - Integration server
define service{
use generic-service
host_name $target
service_description mount point usage
check_command nrpe!diskusage4nagios
define service{
use generic-service
host_name $target
service_description disk usage
check_command nrpe!disk
reload the nagios service, on Debian,
/etc/init.d/nagios3 reload

(obsolete, see the new doc)