"repeat" exec option is limited to 255 cycles, then overruns.
Issue #817
duplicate
Hello,
repeat exec option in monit is limited to 255, and then overruns:
# cat /etc/monit.d/system
check system tpa01.rewcons.net
...
if uptime > 90 days then exec /usr/local/bin/slack-monit repeat every 750 cycles
else if succeeded then exec /usr/local/bin/slack-monit
# monit -v | grep Uptime
Uptime = if greater than 7776000 second(s) then exec '/usr/local/bin/slack-monit' repeat every 208 cycle(s) else if succeeded then exec '/usr/local/bin/slack-monit'
# sed -i 's/every 720/every 300/' /etc/monit.d/system
# monit -v | grep Uptime
Uptime = if greater than 7776000 second(s) then exec '/usr/local/bin/slack-monit' repeat every 44 cycle(s) else if succeeded then exec '/usr/local/bin/slack-monit'
# sed -i 's/every 300/every 255/' /etc/monit.d/system
# monit -v | grep Uptime
Uptime = if greater than 7776000 second(s) then exec '/usr/local/bin/slack-monit' repeat every 255 cycle(s) else if succeeded then exec '/usr/local/bin/slack-monit'
# monit -V
This is Monit version 5.25.1
Built with ssl, with ipv6, with compression, with pam and with large files
Copyright (C) 2001-2017 Tildeslash Ltd. All Rights Reserved.
# cat /etc/centos-release
CentOS Linux release 7.6.1810 (Core)
Couple of issues here:
- Overrun happens quietly, no error messages
- Maximum of 255 is not specified in man page
- 255 cycles is not really enough for certain sensible reminders. For example, we run monit with 60 sec interval, and would like the uptime reminder (and some other) appear once per day. That means once per 1440 cycles. Is it possible to change
uint8_t
to something larger?
Thank you!
Comments (2)
-
reporter -
repo owner - changed status to duplicate
Duplicate of
#891. - Log in to comment