mdstat: Fix parsing of RAID0 lines that contain additional attributes.

We seem to have a small number of Linux servers here that have lines in
/proc/mdstat that cannot be parsed by the node exporter, due to them
containing attributes that are not matched by the regular expression
("super 1.2").

Extend the regular expression to skip this data, just like we do for all
of the other status lines.
This commit is contained in:
Ed Schouten 2016-11-14 14:30:33 +01:00
commit 9749c2c0b3
4 changed files with 10 additions and 1 deletions

View file

@ -34,4 +34,7 @@ md11 : active (auto-read-only) raid1 sdb2[0] sdc2[1]
4190208 blocks super 1.2 [2/2] [UU]
resync=PENDING
md12 : active raid0 sdc2[0] sdd2[1]
3886394368 blocks super 1.2 512k chunks
unused devices: <none>