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

collector/diskstats: add block device rotational #3022

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rexagod
Copy link
Contributor

@rexagod rexagod commented May 23, 2024

Add metric to indicate if a device is rotational or not.

Fixes: #2956

queueDescs: []typedFactorDesc{
{
desc: prometheus.NewDesc(
prometheus.BuildFQName(namespace, diskSubsystem, "rotational"),
Copy link
Member

Choose a reason for hiding this comment

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

Wondering if we should put that into the info metric as label instead. @SuperQ wdyt?

Copy link
Contributor Author

@rexagod rexagod Jun 22, 2024

Choose a reason for hiding this comment

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

I don't have a strong opinion, but I noticed an instance where a device attribute was defined as a metric and left out of the info metric labels.

Copy link
Member

Choose a reason for hiding this comment

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

Good question, it depends a bit on how this is to be used. I kinda feel like this would be more useful as an info metric, as you will want to use it on a join with other metrics.

Having it be a separate metric requires some more awkward PromQL.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@SuperQ Just to be clear, do you mean exposing this as an info metric rather than a gauge, as it is done currently?

@rexagod rexagod force-pushed the 2956 branch 2 times, most recently from 2a22d79 to bac46b7 Compare August 13, 2024 14:21
@rexagod
Copy link
Contributor Author

rexagod commented Aug 13, 2024

Tests keep passing locally for me, I'll need to dig a bit more into this.

@discordianfish
Copy link
Member

@rexagod Any updates on the test failures?

@rexagod
Copy link
Contributor Author

rexagod commented Sep 22, 2024

Rebased on #3131, tests passing.

Sync dependencies and log using the machinery introduced in prometheus#3097.

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
Add metric to indicate if a device is rotational or not.

Fixes: prometheus#2956
Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
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.

feat: support to get rotational of the disk.
3 participants