[nagiosplug] This patch fixes the regular expression for the ...
"Nagios Plugin Development" <[email protected]> Tue, 25 Sep 2012 07:40:45 +0000
| Newsgroups | gmane.network.nagios.plugins.cvs |
|---|---|
| Message-ID | <[email protected]> |
Module: nagiosplug Branch: master Commit: 9703858ba325d069a1a8538a655e3aa186382aa9 Author: Alex Bradley <[email protected]> Date: Fri Sep 21 21:44:41 2012 -0700 URL: http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commit;h=9703858 This patch fixes the regular expression for the array recovery 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%".) --- 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){ if (defined $device) { if (/(\[[_U]+\])/) { $status{$device} = $1; - } elsif (/recovery = (.*?)\s/) { + } elsif (/recovery =\s+(.*?)\s/) { $recovery{$device} = $1; ($finish{$device}) = /finish=(.*?min)/; $device=undef; ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/