Running Nagios XI Linux Agent as init script, not xinetd
Posted: Mon Apr 13, 2015 2:48 pm
Hi, by default the Nagios XI Linux Agent installer runs nrpe under xinetd. One problem with this is that the xinetd only_from setting does a reverse DNS lookup on the IP address and if that does not match then the connection will be refused. In my case I am running Nagios XI in AWS and so the IP address xinetd sees is the internal IP address of my Nagios server, and the reverse IP lookup returns the internal name of the server “ip-172-32-6-213.us-west-2.compute.internal”, so the only two values that work with xinetd are that hostname, or the internal IP of 172.32.6.213, both of which will change if the Nagios instance is terminated and relaunched, which would force updating nrpe configuration on all the monitored servers – not good.
I have found that when nrpe is run as an init script, that allowed_hosts in nrpe.cfg can be configured with a Route 53 hostname and it will work. In that case I can just update the IP address in Route 53 if the Nagios XI server IP address changes. So for me, nrpe run as an init script makes more sense.
My question is whether there are instructions on how to run the Nagios XI Linux Agent as an init script instead of under xinetd.
I have found that when nrpe is run as an init script, that allowed_hosts in nrpe.cfg can be configured with a Route 53 hostname and it will work. In that case I can just update the IP address in Route 53 if the Nagios XI server IP address changes. So for me, nrpe run as an init script makes more sense.
My question is whether there are instructions on how to run the Nagios XI Linux Agent as an init script instead of under xinetd.