Monit startup delay on boot

Issue #829 resolved
Former user created an issue

Add option to allow a one-time start delay when the system uptime is less than a specified number of seconds or minutes.

This is helpful to allow the "with start delay" to be disabled for config reloads but causes false alerts when a system is booted.

Putting this delay in the systemd/init/upstart/etc scripts is difficult to impossible and not practicle for every sysadmin to do when it's a universal need.

Comments (3)

  1. Lutz Mader

    Hello Jan-Henrik,
    nice to know (but a bad idea, from my point of view, sorry).

    Monit daemon with pid [67] stopped
    'Mac' Monit 5.26.0 stopped
    Starting Monit 5.26.0 daemon with http interface at [macbookpro.local]:2812
    Monit will delay for 240s on first start after reboot ...
    

    It seems to me ist does not work well, after a reboot the startup was delayed and some times later I restart monit and the monit start was delayed again.

    But several times later, the restart was not delayed.

    Monit daemon with pid [628] stopped
    'Mac' Monit 5.26.0 stopped
    Starting Monit 5.26.0 daemon with http interface at [macbookpro.local]:2812
    'Mac' Monit 5.26.0 started
    

    How monit detect a start after a reboot?
    From my point of view the "kern.boottime" (MacOS) is used, but I can not find the used reboot test.

    With regards,
    Lutz

    p.s.
    See the post "Monit start delay only on boot" from 01 Jun 2019.

    Back to your suggestion,
    an additional monit start option to give the deplay is more fexible than an additional "monitrc" statement to do this, I think.

    Sometimes it is useful to delay the monit start all the time, but you are right, a longer/additional startup delay is useful.

  2. Log in to comment