Werk #16798: ups_test: Handle unknown time since last test

Komponente Checks & agents
Titel ups_test: Handle unknown time since last test
Datum 17.06.2024
Level Kleine Änderung
Klasse Bugfix
Kompatibilität Kompatibel - benötigt kein manuelles Eingreifen
Checkmk versions & editions
2.4.0b1 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.3.0p7 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)

The time since the last battery test is calculated via the difference between the current uptime and the uptime when the test was initiated. This means the time cannot be determined if the uptime of the test initiation is larger than the current uptime.

Before, this lead to a

ValueError: Cannot render negative timespan

Now, the check will become UNKNOWN instead.

Zur Liste aller Werks