Skip to content

collector/systemd: add system_state_info metric and use timed contexts#3648

Open
arch-yunus wants to merge 1 commit intoprometheus:masterfrom
arch-yunus:improve-systemd-collector
Open

collector/systemd: add system_state_info metric and use timed contexts#3648
arch-yunus wants to merge 1 commit intoprometheus:masterfrom
arch-yunus:improve-systemd-collector

Conversation

@arch-yunus
Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant