From 8de7935ae25817cce322d2e45e3fcafa78f3a1f4 Mon Sep 17 00:00:00 2001 From: Kostis Fardelas Date: Thu, 11 Jun 2015 14:56:35 +0300 Subject: [PATCH] Add some extra error cases a. In case a controller slot is missing b. In case an enclosure is missing Signed-off-by: Martin Zobel-Helas --- dsa-nagios-checks/checks/dsa-check-hpacucli-enclosure | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dsa-nagios-checks/checks/dsa-check-hpacucli-enclosure b/dsa-nagios-checks/checks/dsa-check-hpacucli-enclosure index 0be0b89..9e8a8bc 100755 --- a/dsa-nagios-checks/checks/dsa-check-hpacucli-enclosure +++ b/dsa-nagios-checks/checks/dsa-check-hpacucli-enclosure @@ -109,6 +109,16 @@ for (@$status) { if ($status ne 'OK') { record('WARNING'); }; + } elsif (m/^(Error): (The specified device does not have a Storage Enclosure identified by.*)/) { + my $status = $1; + my $detail = "$enc: Unidentified Storage Enclosure"; + push @{$status{$status}}, $detail; + record('CRITICAL'); + } elsif (m/^(Error): (.*)/) { + my $status = $1; + my $detail = $2; + push @{$status{$status}}, $detail; + record('CRITICAL'); } }; -- 2.20.1