Werk #19144 · Jul 28, 26
systemd_units: Fix false alerts for unit names containing a period
Previously, the Systemd Service Summary check on Linux hosts could emit spurious WARN or CRIT alerts, for example
Service 'X' activating for: Y minutes (warn/crit at A/B)
for systemd units whose name contains a period, such as hapee-3.2-lb.service.
The Linux agent for version 2.4.0 reports the systemd state via two independent systemctl invocations (the [status] and [all] sections), which the plugin matches by unit name.
When parsing the [status] section, the unit name was split at the first period instead of the last, so hapee-3.2-lb.service became hapee-3 instead of hapee-3.2-lb.
The two sections could then no longer be matched for such units, so the state reconciliation that prevents these false alerts was skipped.
The unit name from the [status] section is now derived correctly, so units whose name contains a period are matched again and no longer produce these false alerts.
Details
- Class:
- Bug Fixes
- Level:
- Trivial
- Component:
- Checks
- Versions:
- 3.0.0b1Not yet releasedAll Editions
- 2.5.0p11All Editions
- 2.4.0p36All Editions