Werk #14967: Timesyncd check plugin: Include metrics for sync times, change check behavior when NTP server not reachable and future-proofing

Komponente Checks & agents
Titel Timesyncd check plugin: Include metrics for sync times, change check behavior when NTP server not reachable and future-proofing
Datum 26.10.2022
Level Kleine Änderung
Klasse Neues Feature
Kompatibilität Inkompatibel - Manuelle Interaktion könnte erforderlich sein
Checkmk versions & editions
2.2.0b1 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.1.0p16 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk MSP (CME)

Since at least systemd v250 /var/lib/systemd/timesync/clock should no longer be used to determine the time since the last synchronisation, instead the modification time of /run/systemd/timesync/synchronized is now used. To monitor the reliability of this time, this werk also introduces two new metrics:

  • Time since last synchronisation: The modification time of /run/systemd/timesync/synchronized if available, otherwise /var/lib/systemd/timesync/clock.
  • Time since last NTPMessage: When the last message from the NTP server was received.

To have these metrics available, the Checkmk linux agent needs to be updated, otherwise only the time since last synchronisation based on /var/lib/systemd/timesync/clock will be shown.

Since the modification time of /var/lib/systemd/timesync/clock can at times be unsuitable to monitor when synchronization occurred (due to limited error handling in earlier systemd version), the default threshold for the allowed duration since last synchronisation has been removed. If you want to apply thresholds to the time since last synchronisation you now have to enable them manually in the rule "Systemd Timesyncd time synchronisation". In the same rule, the default thresholds for the allowed duration since last NTPMessage have been set to 1h (WARN) and 2h (CRIT).

Additionally, the behavior of the check was changed to go to CRIT when the NTP server could not be reached for synchronisation.

In the course of the werk the rendering of the jitter was also corrected to show a time span instead of a date.

Zur Liste aller Werks