Fix /proc/net/dev column parsing.
This fixes https://github.com/prometheus/node_exporter/issues/73
This commit is contained in:
parent
5b20dad9ad
commit
072ddabf62
3 changed files with 13 additions and 2 deletions
|
|
@ -21,6 +21,10 @@ func TestNetDevStats(t *testing.T) {
|
|||
t.Errorf("want netstat wlan0 bytes %s, got %s", want, got)
|
||||
}
|
||||
|
||||
if want, got := "68210035552", netStats["receive"]["eth0"]["bytes"]; want != got {
|
||||
t.Errorf("want netstat eth0 bytes %s, got %s", want, got)
|
||||
}
|
||||
|
||||
if want, got := "934", netStats["transmit"]["tun0"]["packets"]; want != got {
|
||||
t.Errorf("want netstat tun0 packets %s, got %s", want, got)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue