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

How to use hwmon labels? #631

Closed
cmsj opened this issue Jul 31, 2017 · 3 comments
Closed

How to use hwmon labels? #631

cmsj opened this issue Jul 31, 2017 · 3 comments

Comments

@cmsj
Copy link

cmsj commented Jul 31, 2017

Host operating system: output of uname -a

Linux nucker 3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

node_exporter version: output of node_exporter -version

node_exporter, version 0.14.0 (branch: master, revision: 840ba5d)
build user: root@bb6d0678e7f3
build date: 20170321-12:12:54
go version: go1.7.5

Are you running node_exporter in Docker?

No

What did you do that produced an error?

Not an error as such, but I'm looking at the hwmon values for this machine and struggling to get decent labels.

What did you expect to see?

node_hwmon_sensor_label{chip="platform_coretemp_0",label="core_0",sensor="temp1"} 1
node_hwmon_temp_celsius{chip="platform_coretemp_0",sensor="temp1",name="core_0"} 46

What did you see instead?

node_hwmon_sensor_label{chip="platform_coretemp_0",label="core_0",sensor="temp1"} 1
node_hwmon_temp_celsius{chip="platform_coretemp_0",sensor="temp1"} 46

ie what I'm asking for here would be to include the label value for each sensor as part of its metadata.

(it's also possible that I am being stupid and there is a great way to relate these things together so my Grafana legends can have "core_0" instead of "temp1" :)

@grobie
Copy link
Member

grobie commented Jul 31, 2017

This is by design, as labels are not available for all sensors. If all you sensors have a label, you can do something like this to join them:

node_hwmon_temp_celsius{...} * ignoring(label) group_left(label) node_hwmon_sensor_label

@grobie grobie changed the title Improve hwmon label names How to use hwmon labels? Jul 31, 2017
@mdlayher
Copy link
Contributor

mdlayher commented Oct 6, 2017

It appears this is a question and the question has been answered, so closing. Feel free to re-open if I am mistaken.

@mdlayher mdlayher closed this as completed Oct 6, 2017
@nh2
Copy link

nh2 commented May 12, 2022

If all you sensors have a label, you can do something like this to join them

For other people googling how to join them when some of the sensors do NOT have labels, I've asked that question here:

https://stackoverflow.com/questions/72217597/prometheus-queries-how-to-give-a-default-label-when-it-is-missing

tamcore pushed a commit to gitgrave/node_exporter that referenced this issue Oct 22, 2024
```
TCP, TCP6, UDP, and UDP6 are dynamically changing,
and when we read these files, we should read them all at once.
there will be data consistency issues if using line by lin reading

fix: prometheus/procfs#576
```

Signed-off-by: weidongkl <weidong@uniontech.com>
tamcore pushed a commit to gitgrave/node_exporter that referenced this issue Oct 22, 2024
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

No branches or pull requests

4 participants