NRPE on Ubuntu

Environment
  • Ubuntu 8.04
Introduction
Allow Nagios to monitor local resources on remote Linux machines

Procedures
Need to install Nagios plugins and add Nagios user account, view http://gayt.blogspot.com/2008/10/nagios-3-on-ubuntu.html

Install xinetd and libssl-dev
#apt-get install libssl-dev xinetd
Download NREP via www.nagios.org

Extract and install on remote Linux machines
#tar zxvf nrpe-{version}.tar.gz
#./nrpe-{version}/configure
#./nrpe-{version}/make all
#./nrpe-{version}/make install-plugin
#./nrpe-{version}/make install-daemon
#./nrpe-{version}/make install-daemon-config
#./nrpe-{version}/make install-xinetd
Edit /etc/services
nrpe 5666/tcp #nrpe
Restart xinetd service
#/etc/init.d/xinetd restart
Edit NRPE commands on remote Linux machines, which is for enable Nagios host to check the remote Linux machines
#vim /usr/local/nagios/etc/nrpe.cfg
Install NRPE on Nagios host
#tar zxvf nrpe-{version}.tar.gz
#./nrpe-{version}/configure
#./nrpe-{version}/make all
#./nrpe-{version}/make install-plugin
Edit commands.cfg for NRPE command to allow Nagios to use NRPE.
#vim /usr/local/nagios/etc/commands.cfg
define command {
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}
The ARG1 should be the service which is set on nrpe.cfg. It already sets some services, for example, check_load. Use this on Nagios
define service{
use generic-service
host_name hostname
service_description CPU Load
check_command check_nrpe!check_load
}
Reference