monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Feature request for config file checking?


From: Jan-Henrik Haukeland
Subject: Re: Feature request for config file checking?
Date: Thu, 24 Jul 2003 17:47:56 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Civil Service, linux)

Mark Ferlatte <address@hidden> writes:

> I've got a large cluster of machines that are all imaged from a
> central server.  What happens currently is that sometimes a config
> gets changed on the master image, gets pushed out, but the daemons
> don't get restarted.
>
> So, since I'm already using monit to see if the daemons are actually
> running, it seemed like it would make sense for monit to check to
> see if the config file had changed since the daemon had started and
> take an action... something like:
>
> check apache with pidfile /var/run/apache.pid
>   start program = /etc/init.d/apache start
>   stop program = /etc/init.d/apache stop
>   checkconfig /etc/apache/httpd.conf and restart on changed checksum
>
> Is this something that would be interesting?  You can almost do it
> already, but you need to embed a checksum into the configfile, which
> is not what I want: I want monit to checksum the file on startup,
> and then check it periodically and restart the daemon if that
> checksum changes.

This feature is now added to the current monit code base in CVS. If
you want to test it, you can check out the monit development version
using anonymous cvs access:

cvs -d:pserver:address@hidden:/cvsroot/monit login

(just press enter when asked for the password)

cvs -z3 -d:pserver:address@hidden:/cvsroot/monit co monit

Once checked out, run ./autogen.sh and make. (Well, you should know
since you fixed this for us in the first place :)

The statement you may use to restart apache, if the httpd.conf was
changed is:

    if timestamp /usr/local/apache/conf/httpd.conf was changed 
      then exec "/etc/init.d/apache restart"

Your current monitrc file should work with this release, if not you
may want to check out: 
http://savannah.nongnu.org/cgi-bin/viewcvs/monit/monit/UPGRADE.txt?rev=1.1&content-type=text/vnd.viewcvs-markup

We are currently working on the CVS code base and will probably
release it in 1-2 weeks. (There are no known issues with the current
code base in CVS so you may safely test it).

-- 
Jan-Henrik Haukeland




reply via email to

[Prev in Thread] Current Thread [Next in Thread]