monit-general
[Top][All Lists]
Advanced

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

Re: Monit dependency problem (bug?)


From: Eric Pailleau
Subject: Re: Monit dependency problem (bug?)
Date: Wed, 14 Dec 2011 19:18:41 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20110620 Thunderbird/5.0b2

Hi,
I mean you may split socket and pidfile monitoring in two parts :

check host apache_80 with address 127.0.0.1
        start program = "/etc/init.d/httpd start"
        stop  program = "/etc/init.d/httpd stop"
        if failed port 80 protocol http with timeout 30 seconds then restart
        if 2 restarts within 2 cycles then timeout

check process apache_pid with pidfile /var/run/httpd.pid
        blahblah ...

Regards.

Le 14/12/2011 19:01, Daniel Rich a écrit :
That's already in there -- that's what is bothering me. I have the port 80 check on localhost that 
is supposed to trigger a restart but it isn't triggering. If that doesn't trigger then neither will 
the "if 2 restarts within 2 cycles" block. I even tried changing the order by moving the 
localhost port 80 check before the "does not exist" check, but that makes no difference.

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 exec "/bin/bash -c 'if [ ! -f /tmp/monit.apachedown ]; then touch 
/tmp/monit.apachedown; /usr/bin/monit stop ospfd; fi'"
     else if recovered then exec "/bin/bash -c 'rm /tmp/monit.apachedown&&  
/usr/bin/monit monitor ospfd'"
   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

On Dec 14, 2011, at 00:30, Eric Pailleau wrote:

Hello,
In addition to pidfile check, you may add a tcp 80 (or another depending what 
apache is binding) check,
or better a http page check  (check host not in the pidfile paragraph).
This will better check that your apache is up and running.
This way you can do a simple apache restart on the second check ? But be 
carefull on dependencies.

regards.

--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Dan Rich<address@hidden>  |   http://www.employees.org/~drich/
                                |  "Step up to red alert!"  "Are you sure, sir?
                                |   It means changing the bulb in the sign..."
                                |          - Red Dwarf (BBC)



--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general


--
Salutations - Best regards - mit freundlichen Grüssen

----------------- address@hidden ------------------------------------
fr - Merci d'utiliser cette addresse pour le support ou question technique
en - Please use this address for any support or technical question
----------------- https://support.numlog.fr --------------------------------
fr - Privilégier la gestion de ticket d'incident  (Clients NUMLOG)
en - Prefere our trouble ticket application   (NUMLOG's customers)




reply via email to

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