packages: nagios-plugin-check_raid/check_raid - fix check_raid being too op...
glen
glen at pld-linux.org
Wed Mar 31 10:07:39 CEST 2010
Author: glen Date: Wed Mar 31 08:07:39 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- fix check_raid being too optimistic on cciss devices thus considering only
devices whose status was OK (the other status like recovery mode were
completely ignored...)
RATIONALE: all cciss users should upgrade
---- Files affected:
packages/nagios-plugin-check_raid:
check_raid (1.70 -> 1.71)
---- Diffs:
================================================================
Index: packages/nagios-plugin-check_raid/check_raid
diff -u packages/nagios-plugin-check_raid/check_raid:1.70 packages/nagios-plugin-check_raid/check_raid:1.71
--- packages/nagios-plugin-check_raid/check_raid:1.70 Wed Feb 24 14:21:04 2010
+++ packages/nagios-plugin-check_raid/check_raid Wed Mar 31 10:07:34 2010
@@ -790,15 +790,15 @@
}
foreach my $c (@c) {
- open(my $fh , '-|', @CMD, $c) or return;
+ open(my $fh , '-|', @CMD, $c) or die $!;
while (<$fh>) {
chomp;
# /dev/cciss/c0d0: (Smart Array P400i) RAID 1 Volume 0 status: OK.
- if (my($s) = /status: (\S+)\./) {
+ if (my($state, $s) = /(.*status: (.*?))\.\s*$/) {
if ($s ne 'OK') {
$status = $ERRORS{CRITICAL};
}
- push(@status, $_);
+ push(@status, $state);
}
}
close($fh);
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/nagios-plugin-check_raid/check_raid?r1=1.70&r2=1.71&f=u
More information about the pld-cvs-commit
mailing list