dsa-check-statusfile: port to python3
[mirror/dsa-nagios.git] / dsa-nagios-checks / checks / dsa-check-hpacucli-enclosure
index 0be0b89..9e8a8bc 100755 (executable)
@@ -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');
        }
 
 };