sensu-plugins / sensu-plugins-io-checks

This plugin provides native system I/O instrumentation for metrics collection via the system `ioping` utility.

Home Page:http://sensu-plugins.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fails to get disk statistics on Ubuntu 18.04 due to changed iostat output format

jonaslm opened this issue · comments

iostat on Ubuntu 18.04 no longer prints "Device:" for the disk headers, but rather just "Device" (without the colon). This makes the regexp trying to find disks fail.

iostat -x output on Ubuntu 14.04:


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0.87    0.00    0.10    0.39    0.00   98.64

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sda               0.00    17.34    0.75   51.82    26.02   612.08    24.28     0.00    0.68    0.99    0.67   0.57   3.01
dm-0              0.00     0.00    0.75   58.95    26.01   612.07    21.38     0.00    0.04    0.99    0.03   0.51   3.02
dm-1              0.00     0.00    0.00    0.00     0.01     0.01     8.00     0.00    5.38    1.54    7.87   0.26   0.00

iostat -x output on Ubutun 18.04 (note the lack of colon after "Device"):


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0.40    0.00    0.08    0.01    0.00   99.51

Device            r/s     w/s     rkB/s     wkB/s   rrqm/s   wrqm/s  %rrqm  %wrqm r_await w_await aqu-sz rareq-sz wareq-sz  svctm  %util
nvme0n1          9.56  647.89    158.28   5024.43     0.00    22.81   0.00   3.40    0.08    0.08   0.05    16.56     7.76   0.00   0.06
dm-0             9.46  663.13    158.22   5023.83     0.00     0.00   0.00   0.00    0.08    0.02   0.01    16.72     7.58   0.01   0.66

Not sure what exactly caused this (some update to the sysstat package?), just noticed it when the check didn't work on our 18.04 server.