monit-general
[Top][All Lists]
Advanced

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

Re: Working with daemontools


From: Martin Pala
Subject: Re: Working with daemontools
Date: Mon, 08 Dec 2003 17:33:01 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031107 Debian/1.5-3

Paul Diaconescu wrote:

Hi,
I'm using daemontools to supervise qmail, fetchmail, spamassassin, proftpd,
etc. I'd like to have some kind of function tests on these programs
(daemontools just restarts processes). An example:

* proftpd is running but doesn't answer to requests. Monit should restart it
with svc 3 times, give up and send me an alert.
* If the process isn't running monit should not try to start it since supervise
is already trying that.
I recommend to use monit for both tasks instead of deamontools (i see no advantage of such combination).

To meet your requirements monit must test whether the process *is running* AND *is not responding* => it is possible to use "check process ... " statement to suite the first condition. You can then mangle your startup script to ignore the start+stop action in the case that monit's environment variable MONIT_EVENT which is handed over to service startup script doesn't contain event of your choice (in your case "connection" event) => restart will be skipped.

This way it will behave as you want to, but there will be allways race condition possibility. To make 100% reliability of such symbiosis interprocess communication (for example locking file) must be used to take care for the critical section. This will involve modifications of daemontools and monit - i think it is not good way and it is better to choose one of them as mentioned above.

More complex: To test that the mail system is working - send a mail to a
testaddress. Check that the mail arrived, delete it and send again. If it
hasn't arrived restart the maildaemons.
Such sort of test is useful, but it is not (yet) implemented in monit.

Cheers,
Martin





reply via email to

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