Geoff Galitz wrote:
I have a feeling that introducing nagios monitoring is a little too involved, though. I want to distribute the setup to external systems, so ideally there should be one "monitoring" package install and a simple "enable" command at the most, in addition to installation of the actual software.
rpm -Uvh monit-<version>.rpm chkconfig monit on
Is really quite ideal, except for the fact that it only nearly gives me what I want :-(
Gotcha. Would a simple shell script be sufficient? Something like:
Yeah, I might just end up doing something like this...
I suppose I could also have "cron" control the "iterations" rather than doing a loop with wait, but that's just a matter of taste...
while : ## loop forever do /sbin/service [app] status if [$? -ne 0 ]; ## services which should be running, but are dead ## return a non-zero status code then service [app] restart fi sleep 120 ## sleep for about two minutes do
Adding mail notifications and other standard functions would be trivial. To monitor various services just create add a for loop in there. Just a thought.
Yep. Maybe it can be that simple. I suppose I just wanted to know if somebody else had published something that would essentially be this script with a few of the trivial extensions you mention, as I don't want to re-invent the wheel even if it's a very basic one. But perhaps not...
- Toralf
-Geoff
Geoff Galitz Blankenheim NRW, Germany http://www.galitz.org/ http://german-way.com/blog/
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
This e-mail, including any attachments and response string, may contain proprietary information which is confidential and may be legally privileged. It is for the intended recipient only. If you are not the intended recipient or transmission error has misdirected this e-mail, please notify the author by return e-mail and delete this message and any attachment immediately. If you are not the intended recipient you must not use, disclose, distribute, forward, copy, print or rely on this e-mail in any way except as permitted by the author.