Skip to content

Commit

Permalink
Rename interface to device in netclass collector
Browse files Browse the repository at this point in the history
This makes it consistent with other networking metrics like node_network_receive_bytes_total

This closes prometheus#1223
  • Loading branch information
discordianfish committed Jan 5, 2019
1 parent 8a6a464 commit 0ee6f0f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions collector/netclass_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
)

Expand Down

0 comments on commit 0ee6f0f

Please sign in to comment.