[Top][All Lists]

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

Re: Avoid alert on log rotation

From: Martin Pala
Subject: Re: Avoid alert on log rotation
Date: Thu, 5 Nov 2015 12:31:45 +0100


monit tests if the process is running - it cannot differentiate that the 
process was stopped intentionally by 3rd party action ... if you shutdown the 
process intentionally during logrotate, you should disable its monitoring first 
(part of logratotation "prerotate" script):

        monit unmonitor myprocess

and when logratotation finished, enable it again (part of logratotation 
"postrotate" script):

        monit monitor myprocess


> On 05 Nov 2015, at 11:42, Guillaume François <address@hidden> wrote:
> Hello,
> Everyday we got an "non-exist" then "exist" alert when the process is 
> shutdown then started for log rotation purpose.
> We would like to NOT receive the email linked to this kind of behavior but 
> still get the email when the process is really down for some time.
> We would like something like
> check process myprocess with pidfile /var/run/
>         start program = "/usr/sbin/service myprocess start"
>         stop program  = "/usr/sbin/service myprocess stop"
>         if failed port 5555 protocol tcp for 3 cycles then restart
>         if 5 restarts within 5 cycles then timeout
> wanted ->        alert on {exist, non-exist} only if 5 event in 5 cycles.
> can be interpreted as -> only send alert for event 'exist' and event 
> 'non-exist' if alert is triggerred 5 time in the last 5 cycles
> We saw we can change the 'alert/noalert' rule for some 'email/event' but we 
> cannot get a "conditional" rules for theses.
> Best Regards,
> -- 
> Version: 3.1
> GCS/IT d(+) s++:- a C++$ ULC(+)>+++$ !P--- L+>$ !E---? W+++$ !N* !o-- K--? 
> w(+) !O---? !M- !V--? PS+? !PE Y+ PGP++>+++ !t-- !5 !X- R(+)>++* tv-? b(-) DI 
> !D- G(+)>+ e+++ h--() r->$ y?*
> ------END GEEK CODE BLOCK------
> --
> To unsubscribe:

reply via email to

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