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:
parent
3867ad5ab0
commit
6ea0aa73e4
3 changed files with 26 additions and 23 deletions
|
|
@ -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,
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue