node_exporter icon indicating copy to clipboard operation
node_exporter copied to clipboard

collector/systemd: add system_state_info metric and use timed contexts

Open bahattinyunus opened this issue 6 months ago • 0 comments

This PR enhances the systemd collector by adding a new info metric for the overall system state and improving the reliability of DBus communications.

Changes Added node_systemd_system_state_info metric: Exposes the system state (e.g., running, degraded) as a label. Implemented Timed Contexts for DBus: Replaced context.TODO() with a context that has a configurable timeout (default 5s). New Flag --collector.systemd.dbus-timeout: Allows configuration of the DBus call timeout. Testing Verified with local systemd collector tests. Confirmed build stability with go build.

bahattinyunus avatar May 07 '26 16:05 bahattinyunus