Installing nrpe-server on Xen-Server 5.5
I use Nagios to monitor all my servers, and Nagios has a nice feature called “parents”, basically what it does is to check parent services before reporting anything, it makes much more sense to report that the entire server is offline instead of all the services running on all the virtual machines running on that host machine. To do this we need to install and configure nrpe-server on Xen-Server.
First we need to download and configure a yum-repo (1):
wget http://download.fedora.redhat.com/pub/epel/5/$(uname -i)/epel-release-5-4.noarch.rpm rpm -hiv epel-release*.rpm sed -i 's/enabled=1/enabled=0/g' /etc/yum.repos.d/epel.repo
Install nrpe and nagios-plugins via yum and configure it to start on boot:
yum install --enablerepo=epel nagios-plugins nrpe chkconfig nrpe on
Configure iptables to accept connections on 5666, the default nrpe-server port. Insert following line before the first -REJECT in /etc/sysconfig/iptables:
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5666 -j ACCEPT
Restart nrpe-server and iptables:
/etc/init.d/nrpe restart /etc/init.d/iptables restart
That’s it. Configure nrpe as you’d normally would, making sure that you’ve edited allowed_hosts to accept connections from your Nagios-server.
Refrences:
(1) http://www.cmdln.org/2010/03/04/installing-nrpe-on-xenserver/