index 11bc3cdcacc9cd7c5629b63fa90bcbedc5b09863..d2e5b4632d4b2b5631f38e45605388a74886efc1 100644 (file)
# WARNING md0 status=[UUU_U], recovery=46.4%, finish=123.0min
use strict;
# WARNING md0 status=[UUU_U], recovery=46.4%, finish=123.0min
use strict;
-use lib utils.pm;
+use lib "/usr/local/nagios/libexec";
use utils qw(%ERRORS);
# die with an error if we're not on Linux
use utils qw(%ERRORS);
# die with an error if we're not on Linux
my $nextdev;
if(defined $ARGV[0]) { $nextdev = shift; }
my $nextdev;
if(defined $ARGV[0]) { $nextdev = shift; }
-else { $nextdev = "md[0-9]"; }
+else { $nextdev = "md[0-9]+"; }
my $code = "UNKNOWN";
my $msg = "";
my $code = "UNKNOWN";
my $msg = "";
} elsif (/recovery = (.*?)\s/) {
$recovery{$device} = $1;
($finish{$device}) = /finish=(.*?min)/;
} elsif (/recovery = (.*?)\s/) {
$recovery{$device} = $1;
($finish{$device}) = /finish=(.*?min)/;
+ $device=undef;
} elsif (/^\s*$/) {
$device=undef;
}
} elsif (/^\s*$/) {
$device=undef;
}