[project @ peter@palfrader.org-20080809094038-47w9c4sxk38twte0]
authorPeter Palfrader <peter@palfrader.org>
Sat, 9 Aug 2008 09:40:38 +0000 (11:40 +0200)
committerPeter Palfrader <peter@palfrader.org>
Sat, 9 Aug 2008 09:40:38 +0000 (11:40 +0200)
dsa-check-hpacucli: Handle 'pd all show' output with failed arrays

dsa-nagios-nrpe-config/debian/changelog
dsa-nagios-nrpe-config/dsa-check-hpacucli

index c4e3c8a..bd37521 100644 (file)
@@ -1,3 +1,9 @@
+dsa-nagios-nrpe-config (50) unstable; urgency=low
+
+  * dsa-check-hpacucli: Handle 'pd all show' output with failed arrays.
+
+ -- Peter Palfrader <weasel@debian.org>  Sat, 09 Aug 2008 11:39:55 +0200
+
 dsa-nagios-nrpe-config (49) unstable; urgency=low
 
   * dsa-check-hpacucli: Learn correct transfer speed for Ultra 3 Wide (160mb/s)
index 2fc7018..a3c42c7 100755 (executable)
@@ -90,9 +90,12 @@ for my $slot (sort @controllers) {
        for (@$pds) {
                chomp;
                next if /^$/;
-               next if /^ *array [A-Z]$/;
                next if (/^\S.*in Slot $slot/);
-               if (/^Error: The specified controller does not have any physical drives on it.$/) {
+               next if /^ *array [A-Z]$/;
+               if (/^ *(array [A-Z]) \(Failed\)$/) {
+                       record('CRITICAL');
+                       push @{$status{'Failed'}}, $1;
+               } elsif (/^Error: The specified controller does not have any physical drives on it.$/) {
                        $nodrives = 1;
                } elsif (/^ *physicaldrive (\S+) .* (OK|Predictive Failure|Failed|Rebuilding)(?:, spare)?\)$/) {
                        my $drive = $1;