[Top][All Lists]

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

tell monit to ignore fails during a restart

From: Jayen Ashar
Subject: tell monit to ignore fails during a restart
Date: Tue, 18 Feb 2014 11:50:11 +1100

Hi there,

Great tool.

I'm using monit 5.1.1 on centos 6 and having trouble getting it to ignore failures during a restart.  I would prefer not to increase the timeout during the check, nor increase the daemon mode polling interval (because this impacts how quickly monit responds to a failure).

This was my latest attempt:

check process tomcat with pidfile /var/run/
  start program = "/bin/bash -c '/sbin/service tomcat7 start; sleep 180'" with timeout 300 seconds
  stop program = "/bin/bash -c 'kill -9 $(</var/run/'"
  if failed host localhost port 8080 protocol http
     and request "/war/servlet"
#     with timeout 180 seconds # to allow war time to startup
#     for 3 cycles # to allow war time to [re]start
     then restart
  if 3 restarts within 5 cycles then timeout

Playing with the start program command seems to have no effect.  What is happening now is that while monit is restarting tomcat, the http check fails because the process is not yet ready.

Is there a way to get monit to skip the http check while tomcat is [re]starting?


Jayen Ashar
SysAdmin/Developer @TripGo
"All the ways"

reply via email to

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