Setting up NRPE on Linux

NOTE: These instructions apply to a system that has not previously had NRPE installed on it.  If NRPE has been previously installed, you will need to backup the nrpe.cfg file to ensure it is not lost.

NOTE2: The system you are installing this on MUST have access to your nagios server on port 80.  You can verify this by typing "telnet 80".

1. Install rpmforge on the linux system

Please refer to this document on installing it if you have not already:

2. Next: install nagios-nrpe on the system

rpm -q nagios-nrpe ||  yum --enablerepo=rpmforge install nagios-nrpe

 Attached is a script you can use on any of your systems to speed up the process of the installation.

1.  Log into your system

2. vi /tmp/install_nrpe

3. Copy the script listed below

4. save the file

5. type "chmod 755 /tmp/install_nrpe"

6. type "/tmp/install_nrpe"

# begin script
rpm -q nagios-nrpe ||  yum --enablerepo=rpmforge install nagios-nrpe || exit 1

[ `uname -i` = i386 ] && i=32
cd /etc/nagios || echo ERROR on cd
back nrpe.cfg &&    # this is a backup script that they probably don’t have
rm nrpe.cfg &&
wget -nv &&
test -f nrpe.cfg || { echo "NRPE.CFG FAILED to wget"  ; exit 1 ; }

[ "$i" = 32 ] && i='’
cd /usr/lib$i/nagios/plugins || { echo ERROR on cd  ; exit 1 ; }

[ "$i" = '' ] && i=32
[ -f check_linux_memory ] && back check_linux_memory &&
back check_linux_procs &&
rm check_linux_memory &&
rm check_linux_procs

wget -nv &&
wget -nv &&
chmod 755 check_linux_procs check_linux_memory &&
test -f check_linux_procs. || echo "NRPE.CFG FAILED to wget check_linx_procs."
echo -n restart nagios ?
read a
service nrpe restart


Binary Data check_linux_procs.13.01 KB
Binary Data check_linux_memory.18.69 KB
Binary Data nrpe.cfg8.53 KB