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:
parent
38ca73e783
commit
9749c2c0b3
4 changed files with 10 additions and 1 deletions
|
|
@ -29,7 +29,7 @@ import (
|
|||
|
||||
var (
|
||||
statuslineRE = regexp.MustCompile(`(\d+) blocks .*\[(\d+)/(\d+)\] \[[U_]+\]`)
|
||||
raid0lineRE = regexp.MustCompile(`(\d+) blocks \d+k chunks`)
|
||||
raid0lineRE = regexp.MustCompile(`(\d+) blocks .*\d+k chunks`)
|
||||
buildlineRE = regexp.MustCompile(`\((\d+)/\d+\)`)
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue