Correct, I want to drop the start delay down to 30 seconds from my current 
setting of 120 so service restarts will have less lag.  However, there could be 
some things like JAVA-based applications that need more time to startup 
completely after a server reboot.

This would be best solved if a new option was added to monit that could check 
the uptime (/proc/uptime) and allow for a special delay at startup separate 
from the current "with start delay."

Maybe something like this:

/etc/monitrc
set daemon 30
    with start delay 30
    and bootup start delay of 120

Then another setting like:

set bootup start delay period 600

so the first 10 minutes of the server booting up would have an extra 120 
seconds of delay.

Thoughts?

I looked at doing something custom with systemd and it's going to be 
difficult/impossible to do a long delay reliably.

________________________________
From: monit-general <[email protected]> on behalf 
of [email protected] <[email protected]>
Sent: Monday, June 3, 2019 2:53 PM
To: This is the general mailing list for monit
Subject: Re: Monit start delay only on boot

Hi Dave,

if monit depends on some services on your system, it'll be maybe better to set 
the dependencies and drop the start delay option from the configuration file.

Best regards,
Martin


On 1 Jun 2019, at 21:31, David Jones <[email protected]<mailto:[email protected]>> 
wrote:

Loving monit.  Just started using it a few months ago to deploy 
Letsencrypt.org<http://letsencrypt.org/> certs from a central server to about 
800 servers/VMs.  Monit will restart/reload each service (Apache, Postfix, 
Haproxy, Nginx, etc.) that references an LE cert when it's renewed every 60 
days.  This is working great.

I am remotely monitoring Monit using Icinga/Nagios and they are working very 
well together.  I am moving many of my Icinga checks into Monit using scripts 
to generate /etc/monit.d/*.cfg files custom for each server.  Then a single 
Icinga/Nagios check using check_monit.py will be customized to each box.

The only minor issue is the delay start that is needed for bootup but causes 
"connection refused" in the monit web interface used by check_monit.py when 
monit restarts.

Would it be possible to have an option added to only delay XX seconds on a 
fresh boot where the uptime is less than a few minutes?  Or allow the monit web 
interface to immediately accept connections if a recent statefile exists?

Thanks,
Dave

-- 
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to