monit-general
[Top][All Lists]
Advanced

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

Re: Monit dependency problem (bug?)


From: Daniel Rich
Subject: Re: Monit dependency problem (bug?)
Date: Wed, 14 Dec 2011 10:01:43 -0800

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)





reply via email to

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