[CentOS] Service monitoring/"Monit"?

Fri Jun 11 08:51:12 UTC 2010
Geoff Galitz <geoff at galitz.org>

> >
> I think you are missing my point. This is precisely what I do not want
> to do. The last bit here, I mean - i.e. I'm asking for a way to set up
> so the "rename /etc/monit.d/sshd.conf to something different" step won't
> be necessary.


Depending on how much effort you are willing to put into this, you can get
nagios to do this.  There are two options:

1) Create a custom plugin that checks "service [app] status" or directly
check the pid file and pgrep/grep for the app.  

2) Write a small script that you stick into the service init script that
tells nagios to start or stop monitoring a service.  I used perl and LWP to
do something very similar but you can probably find another CPAN module or
something similar to act as interface to nagios.


If you are comfortable with scripting and nagios you can bang out a solution
in an afternoon.  Option 1 you can probably do in less than an hour and is
probably better for you.  

---------------------------------
Geoff Galitz
Blankenheim NRW, Germany
http://www.galitz.org/
http://german-way.com/blog/