Werk #16897: chrony: wrong handling of 'n/a' values for 'Ref time (UTC)' and 'Stratum'

Component Checks & agents
Title chrony: wrong handling of 'n/a' values for 'Ref time (UTC)' and 'Stratum'
Date Sep 25, 2024
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed
Checkmk versions & editions
2.4.0b1 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.3.0p19 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.2.0p36 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)

A chrony status without a valid server also contains invalid values for 'Stratum' and 'Ref time', resulting in a 'Time since last sync' of 54 years 256 days being reported (which is the difference to epoc := 1.1.1970).

This change just skips reporting 'Stratum' and 'Time since last sync' if we don't have a valid server (address).

To the list of all Werks