diff options
author | Alex Bradley <a.bradley@alumni.cs.ubc.ca> | 2012-09-22 04:44:41 (GMT) |
---|---|---|
committer | Alex Bradley <a.bradley@alumni.cs.ubc.ca> | 2012-09-22 04:44:41 (GMT) |
commit | 9703858ba325d069a1a8538a655e3aa186382aa9 (patch) | |
tree | 546b407eebd5f2bcd7776c4aa5ef59a5741aa064 | |
parent | 4cdda35b6c6368683a27f0b89d3243b5278d8680 (diff) | |
download | monitoring-plugins-9703858ba325d069a1a8538a655e3aa186382aa9.tar.gz |
This patch fixes the regular expression for the array recoveryrefs/pull/18/head
completion percentage to detect the percentage when there is more than
one space between between "recovery =" and the percentage. (When
the percentage is less than 10%, /proc/mdstat shows it left-padded
with an extra space: "recovery = 7.6%".)
-rw-r--r-- | contrib/check_linux_raid.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/check_linux_raid.pl b/contrib/check_linux_raid.pl index 77e75f6..c24b0cd 100644 --- a/contrib/check_linux_raid.pl +++ b/contrib/check_linux_raid.pl | |||
@@ -61,7 +61,7 @@ while(defined $nextdev){ | |||
61 | if (defined $device) { | 61 | if (defined $device) { |
62 | if (/(\[[_U]+\])/) { | 62 | if (/(\[[_U]+\])/) { |
63 | $status{$device} = $1; | 63 | $status{$device} = $1; |
64 | } elsif (/recovery = (.*?)\s/) { | 64 | } elsif (/recovery =\s+(.*?)\s/) { |
65 | $recovery{$device} = $1; | 65 | $recovery{$device} = $1; |
66 | ($finish{$device}) = /finish=(.*?min)/; | 66 | ($finish{$device}) = /finish=(.*?min)/; |
67 | $device=undef; | 67 | $device=undef; |