|Subject:||Re: Question on Monit|
|Date:||Thu, 14 Mar 2013 19:24:46 +0100|
you can use the "if X restarts withing Y cycles then ACTION" statement. For example if your monit poll cycle is 1 minute ("set daemon 60"):
check process myprocess with pidfile /var/run/myprocess.pid
start program = ...
stop program = ...
if 3 restarts within 60 cycles then exec "/foo/bar"
It'll work as long as monit will restart the process (for example because of crash). Monit can also detect external process restart as "PID change", but there is no statement which will allow to set specific action for this event.
On Mar 14, 2013, at 11:36 AM, <address@hidden> wrote:
|[Prev in Thread]||Current Thread||[Next in Thread]|