[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Restarting after x cycles of downtime
From: |
Rahul Amaram |
Subject: |
Restarting after x cycles of downtime |
Date: |
Thu, 05 Mar 2015 08:06:14 +0530 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:34.0) Gecko/20100101 Icedove/34.0 |
Hi,
I am facing a particular issue. I have defined a monit configuration for
jetty8 as below:
check process jetty8 with pidfile /var/run/jetty8.pid
start program = "/etc/init.d/jetty8 start"
stop program = "/etc/init.d/jetty8 stop"
Now, the problem is at times, when I restart jetty8 manually, and within
that short duration, if monit check runs, it assumes that jetty8 is not
running, tries to restart it and sends an alert.
I would like to use something like "for X cycles" feature. Where in
monit does not attempt restart of jetty8 (or send alert) unless it finds
jetty8 down for X consecutive cycles. I have tried the following syntax
but it is invalid.
check process jetty8 with pidfile /var/run/jetty8.pid for 2 cycles
start program = "/etc/init.d/jetty8 start"
stop program = "/etc/init.d/jetty8 stop"
Suggestions on how this can be achieved would be highly appreciated.
Thanks,
Rahul.
--
<http://www.festivalofmedia.com/asia-pacific/awards>
- Restarting after x cycles of downtime,
Rahul Amaram <=