monit-general
[Top][All Lists]
Advanced

[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 1.5.0.9 (X11/20061222)

Hi,

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:

--8<--
  check process mydb with pidfile /var/run/mydb.pid
    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/myjava.pid
    start program '...'
    stop program '...'
--8<--

In the future multiple actions per rule should be also supported, thus it will provide alternative to hard-dependency as well (http://www.tildeslash.com/monit/doc/next.php#21)


Martin


Efrat Malka wrote:
Hi,

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?

**Thanks,**

**Efrat Malka**

**BigBand Networks**

(

        

03-607-1207

7

        

03-607-1222

,

        

address@hidden <mailto:address@hidden>_

ý

        

_www.bigbandnet.com <http://www.bigbandnet.com/>_





reply via email to

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