monit-general
[Top][All Lists]
Advanced

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

Re: Question on Monit


From: Martin Pala
Subject: Re: Question on Monit
Date: Thu, 14 Mar 2013 19:24:46 +0100

Hi,

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"):

--8<--
check process myprocess with pidfile /var/run/myprocess.pid
start program = ...
stop program = ...
if 3 restarts within 60 cycles then exec "/foo/bar"
--8<--

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.

Regards,
Martin



On Mar 14, 2013, at 11:36 AM, <address@hidden> wrote:

Hi,
I want to achieve book keeping feature with Monit utility, e.g I want to check if the certain process has started thrice in one hours of time and if yes then do some action.
Please let me know how do I achieve that.
 
 
Best Regards,
 
Shilpa Jabin
"To win the race one must venture to run....."
 
----------------------------------------------------------------
Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general


reply via email to

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