Rename interface to device in netclass collector (#1224)

* 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>
This commit is contained in:
Johannes 'fish' Ziemke 2019-02-06 20:02:48 +01:00 committed by Ben Kochie
commit 6ea0aa73e4
3 changed files with 26 additions and 23 deletions

View file

@ -57,8 +57,8 @@ func (c *netClassCollector) Update(ch chan<- prometheus.Metric) error {
for _, ifaceInfo := range netClass {
upDesc := prometheus.NewDesc(
prometheus.BuildFQName(namespace, c.subsystem, "up"),
"Valid operstate for interface.",
[]string{"interface", "address", "broadcast", "duplex", "operstate", "ifalias"},
"Valid operstate for device.",
[]string{"device", "address", "broadcast", "duplex", "operstate", "ifalias"},
nil,
)
upValue := 0.0
@ -145,7 +145,7 @@ func pushMetric(ch chan<- prometheus.Metric, subsystem string, name string, valu
fieldDesc := prometheus.NewDesc(
prometheus.BuildFQName(namespace, subsystem, name),
fmt.Sprintf("%s value of /sys/class/net/<iface>.", name),
[]string{"interface"},
[]string{"device"},
nil,
)