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 boot stage timestamp collector #110

Merged
merged 1 commit into from
Jan 11, 2024

Conversation

jpds
Copy link
Contributor

@jpds jpds commented Nov 13, 2023

No description provided.

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.

A couple questions, otherwise looks good.

systemd/systemd.go Outdated Show resolved Hide resolved
@@ -285,6 +299,37 @@ func (c *Collector) collect(ch chan<- prometheus.Metric) error {
return nil
}

func (c *Collector) collectBootStageTimestamps(conn *dbus.Conn, ch chan<- prometheus.Metric) error {
stages := []string{"Finish", "Firmware", "Loader", "Kernel", "InitRD",
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, there's no way to get the stage list dynamically is there?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not without embedding some of the C code - I doubt the list will change much going forward.

@jpds jpds force-pushed the boot-timestamps branch 2 times, most recently from c97631e to f72a2b0 Compare November 13, 2023 20:56
@SuperQ SuperQ merged commit 0811cc2 into prometheus-community:main Jan 11, 2024
1 check 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