Setting up NRPE on Linux
Attachment | Size |
---|---|
check_linux_procs. | 111.68 KB |
check_linux_memory. | 373.85 KB |
nrpe.cfg | 136.07 KB |
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 nagiosserver.mycompany.com 80".
1. Install rpmforge on the linux system
Please refer to this document on installing it if you have not already: http://wiki.centos.org/AdditionalResources/Repositories/RPMForge
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
i=64
[ `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 http://web3us.com/drupal6/sites/default/files/nrpe.cfg &&
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 http://web3us.com/drupal6/sites/default/files/check_linux_memory. &&
wget -nv http://web3us.com/drupal6/sites/default/files/check_linux_procs. &&
chmod 755 check_linux_procs check_linux_memory &&
test -f check_linux_procs. || echo "NRPE.CFG FAILED to wget check_linx_procs."
echo
echo -n restart nagios ?
read a
service nrpe restart