Werk #17315: systemd_units: Fix time since last status change

Component Checks & agents
Title systemd_units: Fix time since last status change
Date Nov 29, 2024
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed
Checkmk versions & editions
2.4.0b1
Not yet released
Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.3.0p23 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)

Previously, the time since the last status change was extracted with the assumption that the location of this information in the systemctl status is static. However, changes like adding a systemd drop-in file could shift the lines, causing the time to not be found. Now the relevant location is identified dynamically to ensure it is always output correctly.

To the list of all Werks