dsa-check-hpssacli: ignore text after "active spare" from pd status
[mirror/dsa-nagios.git] / dsa-nagios-checks / checks / dsa-check-hpssacli
index 6cae39d..2982600 100755 (executable)
@@ -192,7 +192,7 @@ for my $slot (sort @controllers) {
                        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)(?:, (?:active )?spare)?\)$/) {
+               } elsif (/^ *physicaldrive (\S+) .* (OK|Predictive Failure|Failed|Rebuilding)(?:, (?:active )?spare.*)?\)$/) {
                        my $drive = $1;
                        my $status = $2;
                        push @{$status{$status}}, $drive;