Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

systemd.go: Added watchdog metrics #111

Merged
merged 1 commit into from
Jan 14, 2024

Conversation

jpds
Copy link
Contributor

@jpds jpds commented Nov 13, 2023

No description provided.

@jpds jpds changed the title systemd.go: Watchdog metrics systemd.go: Added watchdog metrics Nov 13, 2023
@jpds jpds force-pushed the watchdog-metrics branch 3 times, most recently from df26437 to 76ca157 Compare November 14, 2023 01:51
systemd/systemd.go Outdated Show resolved Hide resolved
Copy link
Contributor

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit about use of namespace/subsystem.

Also, I'm not so sure about the use of a regexp here, seems like an extra/expensive step to parse a number.

@jpds jpds force-pushed the watchdog-metrics branch 2 times, most recently from 7487fb6 to 027a5a0 Compare January 11, 2024 23:06
@jpds
Copy link
Contributor Author

jpds commented Jan 12, 2024

I retested this on a prod box and we need the regex to remove the @t in the DBus value:

caller=systemd.go:317 level=debug msg="Failed to collect watchdog metrics" err="strconv.ParseFloat: parsing \"@t 149702468689\": invalid syntax"

@jpds jpds force-pushed the watchdog-metrics branch from 027a5a0 to 8baf217 Compare January 12, 2024 11:55
systemd/systemd.go Outdated Show resolved Hide resolved
Signed-off-by: Jonathan Davies <[email protected]>
@jpds jpds force-pushed the watchdog-metrics branch from 8baf217 to 5aebeba Compare January 12, 2024 15:25
@SuperQ SuperQ merged commit 627f562 into prometheus-community:main Jan 14, 2024
4 checks passed
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.

2 participants