Update diskstats for linux kernel 4.19 (#1109)

The format of /proc/diskstats is changing in linux-4.19 to include some
additional fields.  See: https://www.kernel.org/doc/Documentation/iostats.txt

* collector/diskstats: use constants for some hard coded strings
* collector/diskstats: update diskstats for linux-4.19
* collector/diskstats: remove kernel doc url from individual metrics

Signed-off-by: Paul Gier <pgier@redhat.com>
This commit is contained in:
Paul Gier 2018-10-15 10:24:28 -05:00 committed by Ben Kochie
commit e8d8199072
5 changed files with 107 additions and 24 deletions

View file

@ -37,4 +37,8 @@ func TestDiskStats(t *testing.T) {
if want, got := "68", diskStats["mmcblk0p2"][10]; want != got {
t.Errorf("want diskstats mmcblk0p2 %s, got %s", want, got)
}
if want, got := "11130", diskStats["sdb"][14]; want != got {
t.Errorf("want diskstats sdb %s, got %s", want, got)
}
}