Installing NRPE for Nagios Monitoring

When you have more then three servers to monitor, automating the installation of NRPE is a must! At Digital Pacific, the configurations that I have written are very versatile, there is about ten main lines, and adding or removing a server from that line determines what services will be monitored and how.

I have built a set of RPMs for all the servers there so that installing NRPE is basically done in two steps, and can be done completely hands off (if your hostname is set up correctly – which sometimes is not done).

Step One

Install the Nagios repository into /etc/yum.repos.d/

wget http://software.digitalpacific.com.au/repos/nagios.repo -O /etc/yum.repos.d/nagios.repo

Install NRPE

yum install dp-nrpe dp-nagios-plugins

Step Two

Do a few basic configuration file edits!

BOB=`hostname -i`; sed -i \
     /etc/nagios/nrpe.cfg -e "s/^server_address=\(.*\)$/server_address=$BOB/"
chkconfig --add nrpe
service nrpe start
service nrpe restart

If NRPE restarts you know you have done well!

Leave a Comment

Your email address will not be published. Required fields are marked *