Skip to content

Comments

Add clocksource metrics to time collector#2197

Merged
discordianfish merged 4 commits intomasterfrom
add-clocksource-collector
Nov 12, 2021
Merged

Add clocksource metrics to time collector#2197
discordianfish merged 4 commits intomasterfrom
add-clocksource-collector

Conversation

@discordianfish
Copy link
Member

@discordianfish discordianfish commented Nov 5, 2021

Straight forward implementation of #1336

One thing I'm not sure about is the 'device' label. Looks like in /sys/devices/system/clocksource there are 'clocksource sources'. Each of the clocksource source has 'available_clocksource' and 'current_clocksource'.
All systems I've checked only have /sys/devices/system/clocksource/clocksource0, so dunno if multiple 'clocksource sources' even exists.

@pgier since you implemented prometheus/procfs#154, maybe you have some opinions on this?

@discordianfish discordianfish force-pushed the add-clocksource-collector branch 4 times, most recently from ff8d354 to 9c5646a Compare November 5, 2021 12:34
@discordianfish discordianfish marked this pull request as ready for review November 5, 2021 14:03
@SuperQ
Copy link
Member

SuperQ commented Nov 5, 2021

Hmm, how weird would this be to put in the timex collector?

@discordianfish discordianfish force-pushed the add-clocksource-collector branch from 9c5646a to 3e3e721 Compare November 8, 2021 10:20
@discordianfish
Copy link
Member Author

@roidelapluie Thanks, fixed!

@SuperQ Copying my response from chat for reference:

Hmm, how weird would this be to put in the timex collector?

Yeah was considering that as well but ended up with a standalone collector since timex might require --cap-add=SYS_TIME

But lemme know, I'm fine either way.

This closes #1336

Signed-off-by: Johannes 'fish' Ziemke <github@freigeist.org>
@discordianfish discordianfish force-pushed the add-clocksource-collector branch from 3e3e721 to c368a01 Compare November 10, 2021 12:39
@discordianfish discordianfish changed the title Add clocksource collector Add clocksource metrics to time collector Nov 10, 2021
@discordianfish discordianfish force-pushed the add-clocksource-collector branch from 9bbc9da to 06a998b Compare November 10, 2021 14:05
Signed-off-by: Johannes 'fish' Ziemke <github@freigeist.org>
@discordianfish discordianfish force-pushed the add-clocksource-collector branch from 06a998b to 294119e Compare November 10, 2021 14:11
Copy link
Member

@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.

LGTM

@discordianfish discordianfish force-pushed the add-clocksource-collector branch 2 times, most recently from 36d6586 to 0a86bea Compare November 11, 2021 10:28
Signed-off-by: Johannes 'fish' Ziemke <github@freigeist.org>
@discordianfish discordianfish force-pushed the add-clocksource-collector branch from 0a86bea to d48ea72 Compare November 11, 2021 10:33
Copy link
Member

@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.

LGTM

We can't declare sysfs in time.go since the sysfs package itself is
linux only.

Signed-off-by: Johannes 'fish' Ziemke <github@freigeist.org>
@discordianfish discordianfish force-pushed the add-clocksource-collector branch from ab00063 to 32c520c Compare November 12, 2021 10:33
@discordianfish discordianfish merged commit 85e2023 into master Nov 12, 2021
@discordianfish discordianfish deleted the add-clocksource-collector branch November 12, 2021 10:45
@discordianfish discordianfish mentioned this pull request Nov 15, 2021
oblitorum pushed a commit to shatteredsilicon/node_exporter that referenced this pull request Apr 9, 2024
* Add clocksource metrics to time collector

This closes prometheus#1336

Signed-off-by: Johannes 'fish' Ziemke <github@freigeist.org>
oblitorum pushed a commit to shatteredsilicon/node_exporter that referenced this pull request Apr 9, 2024
* Add clocksource metrics to time collector

This closes prometheus#1336

Signed-off-by: Johannes 'fish' Ziemke <github@freigeist.org>
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.

3 participants