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

standardize between interface and device for network metric labels #1223

Closed
poblahblahblah opened this issue Jan 5, 2019 · 4 comments · Fixed by #1224
Closed

standardize between interface and device for network metric labels #1223

poblahblahblah opened this issue Jan 5, 2019 · 4 comments · Fixed by #1224
Labels

Comments

@poblahblahblah
Copy link

poblahblahblah commented Jan 5, 2019

Host operating system: output of uname -a

Linux prom1 4.4.0-1069-aws #79-Ubuntu SMP Mon Sep 24 15:01:41 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

node_exporter version: output of node_exporter --version

node_exporter, version 0.17.0 (branch: HEAD, revision: f6f6194a436b9a63d0439abc585c76b19a206b21)
  build user:       root@322511e06ced
  build date:       20181130-15:51:33
  go version:       go1.11.2

node_exporter command line flags

--web.listen-address :9100 --collector.textfile.directory /var/tmp/prom-node_exporter-textfile-outgoing --collector.meminfo_numa --collector.ntp --no-collector.infiniband --no-collector.zfs --no-collector.wifi --no-collector.uname --no-collector.bcache

Are you running node_exporter in Docker?

No

What did you do that produced an error?

Running node_exporter with the above options

What did you expect to see?

I expected to see that the metrics node_network_speed_bytes and node_network_receive_bytes_total would have the same way of accessing an interface name.

What did you see instead?

node_network_speed_bytes uses interface whereas node_network_receive_bytes_total uses device. I think that this should be consistent between all network metrics. It looks like the metrics pulled from /sys/class/net/<iface> use interface.

# HELP node_network_speed_bytes speed_bytes value of /sys/class/net/<iface>.
# TYPE node_network_speed_bytes gauge
node_network_speed_bytes{interface="bond0"} 2.5e+09
node_network_speed_bytes{interface="eno1"} 1.25e+09
node_network_speed_bytes{interface="eno2"} 1.25e+09

# HELP node_network_protocol_type protocol_type value of /sys/class/net/<iface>.
# TYPE node_network_protocol_type gauge
node_network_protocol_type{interface="bond0"} 1
node_network_protocol_type{interface="eno1"} 1
node_network_protocol_type{interface="eno2"} 1
node_network_protocol_type{interface="eno3"} 1
node_network_protocol_type{interface="eno4"} 1
node_network_protocol_type{interface="lo"} 772

# HELP node_network_receive_bytes_total Network device statistic receive_bytes.
# TYPE node_network_receive_bytes_total counter
node_network_receive_bytes_total{device="bond0"} 1.11757646985338e+15
node_network_receive_bytes_total{device="eno1"} 5.6070006366616e+14
node_network_receive_bytes_total{device="eno2"} 5.5687640618722e+14
node_network_receive_bytes_total{device="eno3"} 0
node_network_receive_bytes_total{device="eno4"} 0
node_network_receive_bytes_total{device="lo"} 1.3846584307e+10
@SuperQ
Copy link
Member

SuperQ commented Jan 5, 2019

It looks like we missed this when reviewing the netclass collector (#851).

@SuperQ SuperQ added bug accepted platform/Linux Linux specific issue labels Jan 5, 2019
@discordianfish
Copy link
Member

Good catch!

discordianfish added a commit that referenced this issue Jan 5, 2019
This makes it consistent with other networking metrics like node_network_receive_bytes_total

This closes #1223

Signed-off-by: Johannes 'fish' Ziemke <github@freigeist.org>
SuperQ pushed a commit that referenced this issue Feb 6, 2019
* Rename interface to device in netclass collector

This makes it consistent with other networking metrics like node_network_receive_bytes_total

This closes #1223 

Signed-off-by: Johannes 'fish' Ziemke <github@freigeist.org>
@poblahblahblah
Copy link
Author

Can we get a release cut for this fix?

@SuperQ
Copy link
Member

SuperQ commented Mar 5, 2019

Yes, we have a couple of cleanup items I want to get in before the next release.

oblitorum pushed a commit to shatteredsilicon/node_exporter that referenced this issue Apr 9, 2024
* Rename interface to device in netclass collector

This makes it consistent with other networking metrics like node_network_receive_bytes_total

This closes prometheus#1223 

Signed-off-by: Johannes 'fish' Ziemke <github@freigeist.org>
oblitorum pushed a commit to shatteredsilicon/node_exporter that referenced this issue Apr 9, 2024
* Rename interface to device in netclass collector

This makes it consistent with other networking metrics like node_network_receive_bytes_total

This closes prometheus#1223 

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants