Author: glen Date: Sat Apr 7 15:44:17 2012 GMT
Module: packages Tag: HEAD
---- Log message:
- tw_cli: check all disks status, not only in degraded state
from Jeff B. Hallyburton:
individual drive checking for 3ware cards (this had caused some problems where
arrays had hotspares, drives could die and you never be notified because the
arrays rebuilt and returned to optimal).
---- Files affected:
packages/nagios-plugin-check_raid:
check_raid (1.115 -> 1.116)
---- Diffs:
================================================================
Index: packages/nagios-plugin-check_raid/check_raid
diff -u packages/nagios-plugin-check_raid/check_raid:1.115
packages/nagios-plugin-check_raid/check_raid:1.116
--- packages/nagios-plugin-check_raid/check_raid:1.115 Sat Apr 7 17:20:15 2012
+++ packages/nagios-plugin-check_raid/check_raid Sat Apr 7 17:44:12 2012
@@ -744,24 +744,28 @@
push(@cstatus, "$u:$s $p% ");
} elsif ($s eq 'DEGRADED') {
- open(my $fh , '-|', @CMD, 'info', $c,
'drivestatus');
- my @ds;
- if ($fh) {
- my @p;
- while (<$fh>) {
- next unless (my($p, $s) =
/^(p\d+)\s+(\S+)\s+\Q$u\E/);
- push(@ds, "$p:$s");
- }
- close $fh;
- }
- push(@cstatus, "$u:$s (disks: ".join(' ', @ds).
")");
+ push(@cstatus, "$u:$s");
$status = $ERRORS{CRITICAL};
} else {
push(@cstatus, "$u:$_");
$status = $ERRORS{UNKNOWN} unless $status;
}
+ push(@status, "$c($model): ". join(',', @cstatus));
}
- push(@status, "$c($model): ". join(',', @cstatus));
+ close $fh;
+
+ # check individual disk status
+ open($fh , '-|', @CMD, 'info', $c, 'drivestatus');
+ my (@p, @ds);
+ while (<$fh>) {
+ next unless (my($p, $s,) =
/^(p\d+)\s+(\S+)\s+.+\s+.+\s+.+/);
+ push(@ds, "$p:$s");
+ foreach (@ds) {
+ $status = $ERRORS{CRITICAL} unless (/p\d+:OK/);
+ }
+ }
+
+ push(@status, "(disks: ".join(' ', @ds). ")");
close $fh;
}
================================================================
---- CVS-web:
http://cvs.pld-linux.org/packages/nagios-plugin-check_raid/check_raid?r1=1.115&r2=1.116
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit