http://www.twoevils.org/files/netsaint_statd/
- Ok, so it seems the good Debian maintainers have done some work! They seem to have nagios-statd working on Python 2.5 I will give it a try and see. You can too! Get it here: nagios-statd
- Another note: It seems timeouts can cause the daemon to re-spawn as well, so I am moving on from Nagios-statd!
I wonder if this could be the cause of the extra spawned daemon?: http://emptysqua.re/blog/night-of-the-living-thread/
- Note!!! Python 2.6 SocketServer has bugs that cause failures after running for a bit. I have luck with Python 2.4.6 currently - search for SocketServer on this blog to find the other post with notes on that subject.
Ok, so you can use IPTables to block and just skip the -a limit ip address argument and allow things to run. Bug in there somewhere.
(Note: Python 2.7.1 does not work, the drop -a does not work - trying 2.5.5)
(Note: Python 2.7.1 still has the bug, just drop the -a ipaddr bit and go)
Alternatively, you can use Python 2.7 - so far so good - grab it and do: configure make make altinstall
That will keep the local installed version and chuck you in /usr/local/bin for python2.7. Swap out the version at the top of the script and you should be good to go.
Ok, now to fill in the blanks....
Copy the files from the tgz to your system preferred locations for add on files:
cp ./bin/nagios-stat /usr/local/bin cp ./sbin/nagios-statd /usr/local/sbin
You only need to do the statd version if this host is going to "be monitored" The other script is used to check the remote statd daemon.
Fire up the daemon (restrict to the correct ip for your Nagios server)
/usr/bin/python /usr/local/sbin/nagios-statd -a nagios.server.ip.address Since it might be in the path, you could just run it as well....
(Pepper it in to a start / stop script as you see fit)
Now just put the other script on the Nagios server and wire up checks to it. Test it by running it against the Nagios host running the statd version.
Remember to add the services to /etc/nagios/nrpe.cfg if you are using an internal host to relay the checks.