|Subject:||Re: Avoid alert on log rotation|
|Date:||Fri, 6 Nov 2015 12:05:43 +0100|
you can postpone the action this way:
check process myprocess with pidfile /var/run/myprocesspid.pid
if does not exist for 2 cycles then restart # wait for two cycles before restarting the process
It is definitely not against monit goal that if the process is to be intentionally stopped, monit must also be notified about it to not try to restart the process automatically as from monit's point of view the process died. It is the same as if the process will run under upstart, systemd or sun cluster control: if it will be killed, upstart/systemd/suncluster will also restart it when they detect that the process died as they don't "know" that the service was intentionally stopped by external action intentionally (by logrotate in this case).
The monitoring is suppressed just for the timeframe where the service is under by 3rd party maintenance and enabled again when it's safe to monitor again. It is also possible to stop/start the service via monit instead just unmonitor/monitor.
|[Prev in Thread]||Current Thread||[Next in Thread]|