|
From: | Eric Pailleau |
Subject: | Re: Monit dependency problem (bug?) |
Date: | Thu, 08 Dec 2011 09:10:25 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20110620 Thunderbird/5.0b2 |
Hello, did you simply try this ? ---8<---------------- check process apache with pidfile /var/run/httpd.pid start program = "/etc/init.d/httpd start" stop program = "/etc/init.d/httpd stop" if does not exist then restart if failed host localhost port 80 protocol http and request "/" then restart if children> 50 then restart if 2 restarts within 2 cycles then timeout group server depends on tomcat check process ospfd with pidfile /var/run/quagga/ospfd.pid start program = "/etc/init.d/ospfd start" stop program = "/etc/init.d/ospfd stop" depends on apache depends on fcserver depends on mysql depends on tomcat group network ---8<---------------- Because ospfd depends on apache, any failure on apache will stop ospfd, then restart apache then start ospfd . Crossing start of processes inside individual process monitoring is simply trying to doing worst what monit is created for. 'depends' is certainly the lonely option to use in majority of case.If there is a real needing to cross start process in an 'exec', prefere to use the '/etc/init.d/ospfd stop [&& /usr/bin/monit unmonitor ospfd]?' command instead of '/usr/bin/monit stop ospfd' because in second case, the stop status is a user request and this state is kept until
another user request for start. regards Le 07/12/2011 22:56, drich a écrit :
Taking out the depends doesn't make a difference, it still stays in that loop where it is spewing to the logs. I'm off-site today, I'll look at this more tomorrow morning when I can pay attention to it rather than to the lecture I'm supposed to be listening to. :-) On 07.12.2011 13:13, Martin Pala wrote:Yes, it Eric is correct. The "monit stop…" in the exec action cannot be combined in this case with the "depends on…"
[Prev in Thread] | Current Thread | [Next in Thread] |