About keepalive: What Is It?
|The keepalive script and related status/restart scripts encompass a very simple methodology: automation.What does it do?
Basically, the keepalive script is a simple daemon that runs on a UNIX host.� It monitors processes and takes the appropriate action when it determines that a process needs to be restarted.
How does it do it?
If the keepalive daemon gets a state of 0 (state is bad), it will execute that same script with the “restart” option, and, shortly thereafter, it will check the process status again.� It will continue to do this one more time until it gives up, logs an error, sends an email notification (if so configured), and goes on to the next process.
Where to go from here?
Is this Yet-Another-Monitoring-Tool?
In some sense, yes, it is. You have tools like Big Brother (which I have never, ever, been fond of because of its need for both a client and a server, but it is a good application) and Nagios (my personal favorite) which provide similar services. However, this script provides a stand-alone method for monitoring services and automating the way things are reacted upon. It is a simple setup, very easy to get it up and going, and extremely easy to extend. Is this good for large scale installations? I doubt it. But for those situations where you have a few systems that have critical services, this application is an excellent tool to have in your toolbox.