[Top][All Lists]

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

Re: monit configuration problem

From: Martin Pala
Subject: Re: monit configuration problem
Date: Mon, 29 Jan 2007 19:40:40 +0100
User-agent: Thunderbird (X11/20061222)


Monit currently ensures the correct start/stop/restart order in dependency chain, but doesn't wait for the parents to come up (i.e. soft-dependency). We plan to improve it in the future and provide hard-dependency as well.

However, it is possible to configure monit the way you asked for - you can use the exec action for failed and recovery events, for example:

  check process mydb with pidfile /var/run/
    start program '...'
    stop program '...'
if failed port 3306 protocol mysql then exec '/bin/monit unmonitor myjava' else if recovered then exec '/bin/monit monitor myjava'

  check process myjava with pidfile /var/run/
    start program '...'
    stop program '...'

In the future multiple actions per rule should be also supported, thus it will provide alternative to hard-dependency as well (


Efrat Malka wrote:

I have configured my monit configuration file with 2 entries: DB connectivity and a Java program, where the *Java *program* depends *on the* DB connectivity*.

Currently I use the restart option if the DB connectivity is lost. However, this poses a problem, since once the connectivity fails and restarts, the Java program restarts as well (whereas at this point, the connectivity fails…).

It would have been optimal for me to use for the “if failed” of the DB connectivity, stop for the Java program, and add an “if successful” condition to the DB connectivity, with Java start. Is this at all possible? If not, is there an alternative for that, so that my java program won’t keep restarting itself?


**Efrat Malka**

**BigBand Networks**









address@hidden <mailto:address@hidden>_



reply via email to

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