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.
Running Nagios XI Linux Agent as init script, not xinetd
Re: Running Nagios XI Linux Agent as init script, not xinetd
Well, just as any other init script based daemon. You can take a look at the init scripts in the linux-agent source by untaring the nrpe subcomponent and looking at the different init-script[-*]s:
Just copy the desired one over to /etc/init.d, set the proper permissions and then start it with:
Remember to check your firewall settings etc, as these things are normally handled by xinetd.
Code: Select all
cd /tmp/linux-nrpe-agent/subcomponents/nrpe/
tar vfxz nrpe-2.15.tar.gz
./configure
cat init-scrip* | moreCode: Select all
/etc/init.d/nrpe startFormer Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.