OK, so lets say I have a Nagios setup that monitors different services using the so-called nagios-plugins.
What would be the best practive for my nagios plugin (probably written in python) to determine if given service is running OK?
The particular service in question is a python socket server that listens on some port. So I will make sure nagios frequently checks that service and if it stops responding / dies, I should restart it. What should I do to know if the socket server is alive? Eventually how would I check if it is responding.
I have control over the service - I can change the way it works if that would help me determine it's health state.
Any ideas are welcome!