From a8361b7cfd0af303947fff58a20e7e0d40a80d80 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Fri, 9 May 2008 12:55:24 +0000 Subject: [PATCH] [project @ peter@palfrader.org-20080509125524-spvutul11i214x23] Teach dsa-check-hpacucli about rebuilding --- dsa-nagios-nrpe-config/debian/changelog | 6 ++++++ dsa-nagios-nrpe-config/dsa-check-hpacucli | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/dsa-nagios-nrpe-config/debian/changelog b/dsa-nagios-nrpe-config/debian/changelog index d557973..6271668 100644 --- a/dsa-nagios-nrpe-config/debian/changelog +++ b/dsa-nagios-nrpe-config/debian/changelog @@ -1,3 +1,9 @@ +dsa-nagios-nrpe-config (40) unstable; urgency=low + + * Teach dsa-check-hpacucli about rebuilding. + + -- Peter Palfrader Fri, 9 May 2008 12:55:07 +0000 + dsa-nagios-nrpe-config (39) unstable; urgency=low * Add dsa-check-hpacucli. diff --git a/dsa-nagios-nrpe-config/dsa-check-hpacucli b/dsa-nagios-nrpe-config/dsa-check-hpacucli index c04e9ea..1fd74e6 100755 --- a/dsa-nagios-nrpe-config/dsa-check-hpacucli +++ b/dsa-nagios-nrpe-config/dsa-check-hpacucli @@ -93,12 +93,13 @@ for my $slot (sort @controllers) { next if (/^\S.*in Slot $slot/); if (/^Error: The specified controller does not have any physical drives on it.$/) { $nodrives = 1; - } elsif (/^ *physicaldrive (\S+) .* (OK|Predictive Failure|Failed)(?:, spare)?\)$/) { + } elsif (/^ *physicaldrive (\S+) .* (OK|Predictive Failure|Failed|Rebuilding)(?:, spare)?\)$/) { my $drive = $1; my $status = $2; push @{$status{$status}}, $drive; if ($status eq 'OK') { - } elsif ($status eq 'Predictive Failure') { + } elsif ($status eq 'Predictive Failure' || + $status eq 'Rebuilding') { record('WARNING'); } elsif ($status eq 'Failed') { record('CRITICAL'); -- 2.20.1