Notice: Don't follow the notes below, just install Python 2.4.6 and go to town as there seems to be issues with SocketServer.py in the 2.6 release as of last nights tgz source release - that I grabbed on 8/27/09. With the old 2.4.6 nagios-statd is sailing along just fine!
To lazy to grab Python 2.4?
Here ya go:
Python-2.4.6.tar.bz2
Debian and Ubuntu folks will need to also :
apt-get install build-essential
Don't forget to add the -a ip-of-nagios-server to the /etc/defaults/nagios-statd-server
Change the shebang line in nagios-statd from /usr/bin/python to /usr/local/bin/python - if you built defaults, and restart the service.
If you find that your nagios-statd is throwing socket errors on connect after running o.k. for a bit:
You might have an issue mentioned here:
http://bugs.python.org/issue5814
It seems that an option went away in 2.6 that some code uses (it is apparently fixed in 3.0 and put in to Python's svn back in July 09):
http://svn.python.org/view?view=rev&revision=73887
For the impatient, here is the one line change:
Old version: pid, status = os.waitpid(0, options=0) Becomes: pid, status = os.waitpid(0, 0)
So, the short of it is, replace your SocketServer.py in your Python install.
How did I find the issue? Well, I just repointed stderr from the script to a file and restarted nagios-statd and waited for the condition to occur again. The script nagios-statd had the stderr pointed to /dev/null.
Ok, so it would seem that was not the fix! - Good luck getting it working again. The Python 3 series would require a bit of a re-write.
Looks like the Ubuntu folk have noticed this issue and have some evidence that it might be due to options of --bindto or --allowedhosts
Need to look at the code someday - probably at the same time I get around to fixing it for Python3!
https://bugs.launchpad.net/ubuntu/+source/nagios-statd/+bug/463795