monit-general
[Top][All Lists]
Advanced

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

Re: check process with delay


From: Martin Pala
Subject: Re: check process with delay
Date: Tue, 28 Oct 2014 15:39:07 +0100

Hello,

you can disable the monitoring before your update begins and enable it again 
when it stops:

        1.) monit unmonitor exim
        2.) perform exim update / deploy application
        3.) monit monitor exim

If you need to delay the implicit restart if the process stopped, you can 
override the default action:

--8<--
check process exim with pidfile /var/spool/exim/exim-daemon.pid
        if does not exist for 10 cycle then restart
--8<--

Regards,
Martin



> On 28 Oct 2014, at 15:21, Do <address@hidden> wrote:
> 
> Hello,
> 
> Many people, like me, have host management systems (like cPanel), that when 
> doing periodic system update can temporary stop/start services on its own. 
> But I still want Monit to watch services. So I need Monit to lag a bit for 
> its checks, thus making it always slower than quick service stop/start when 
> system is updated. But I don't see suitable options in Monit config.
> 
> For example, If I have
> 
> check process exim with pidfile /var/spool/exim/exim-daemon.pid
>  every 10 cycles
>  start   "/sbin/service exim start"
> 
> (where cycle=1minute), this does not guarantee that Exim is permitted to be 
> down for 10 minutes. It could happen than Monit just reached 10th cycle 
> seconds before Exim is stopped. As consequence Exim will be started in the 
> middle or stopping or updating.
> 
> Can we have something like 'for 10 cycles [then start]' option added for 
> 'every 1 cycle' statement? (Feature request.)
> 
> Thanks,
> Don.
> 
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general




reply via email to

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