- changed status to resolved
[Feature Request] "monit status" should show last check time / next check time per check
Currently “monit status” shows the “data collected” time that appears to be refreshed based on the daemon poll time. However, in the case of a check that only runs “every 10 cycles” that time isn’t that significant. It would be ideal if there were “last check” and “next check” times. In this case if data was collected at 12:00:00 with 10-second polling and the check was configured for every 6 cycles then the first and “last check” would be at 12:00:00 and the “next check” would be 12:01:00 even though the next data collections would be at 12:00:10, 12:00:20 … 12:00:50 until the next check.
Comments (4)
-
repo owner -
reporter Wow, thanks, that was fast!
-
reporter - changed status to open
hmm, this doesn't seem to be fixed.
My config:
check program test-mount-path with path "/usr/local/bin/test-nfs-mount /srv/path" timeout 5 seconds every 1000 cycles
after a few cycles: data collected of the system is Fri, 28 May 2021 14:00:15 and so is the test-mount-path.
The test-nfs-mount script logs to syslog when it's called. I can see that it was only invoked once yet the data collection date continues to be updated on each cycle.
\$ monit --version This is Monit version 5.28.1 Built with ssl, with ipv6, with compression, with pam and with large files Copyright (C) 2001-2021 Tildeslash Ltd. All Rights Reserved.
I can see from the git log that the build from src contains the commit:
commit 6b5d535071ef5c75aec199acfbfc92643fb45d11 (HEAD -> master, origin/master, origin/HEAD)
Author: tildeslash info@tildeslash.com
Date: Fri May 28 06:28:49 2021 +0200Fixed: Issue #986: Services with custom check schedule did set the data collection timestamp even if the monitoring was skipped in the given cycle. The timestamp is now updated only when the check was performed.
-
repo owner - changed status to resolved
fix Issue
#986... the 'check program' is a special case→ <<cset 3e554e213d76>>
- Log in to comment
Fixed: Issue
#986: Services with custom check schedule did set the data collection timestamp even if the monitoring was skipped in the given cycle. The timestamp is now updated only when the check was performed.→ <<cset 6b5d535071ef>>