X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=dsa-nagios-nrpe-config%2Fdsa-check-hpacucli;h=a34738897ac81903992fd2c34e983426310c4e95;hb=f8a07ee22a749cd23a0ae76447400d10f3d6c36f;hp=4ee5bbe81bc3a09c1e95bcdaf0690381401eba8a;hpb=e41958de0cbf92f7975e8593a23e8a87eda9fdc6;p=mirror%2Fdsa-nagios.git diff --git a/dsa-nagios-nrpe-config/dsa-check-hpacucli b/dsa-nagios-nrpe-config/dsa-check-hpacucli index 4ee5bbe..a347388 100755 --- a/dsa-nagios-nrpe-config/dsa-check-hpacucli +++ b/dsa-nagios-nrpe-config/dsa-check-hpacucli @@ -120,7 +120,7 @@ for my $slot (sort @controllers) { # sometimes stuff breaks and they fall back to 10mb/sec. for my $drive (@drives) { # skip drives that are known to have failed - next if (grep {$drive eq $_} @{$status{'Failed'}}); + next if (exists $status{'Failed'} && grep {$drive eq $_} @{$status{'Failed'}}); my $type; if ($drive =~ /^[0-9]+:[0-9]+$/) { # scsi drives $type = 'SCSI'; @@ -163,7 +163,11 @@ for my $slot (sort @controllers) { }; } elsif ($type eq 'SAS') { $key = 'PHY Transfer Rate'; - $expected = '3.0GBPS'; + if ($value{'PHY Count'} eq '2') { + $expected = '3.0GBPS, Unknown'; + } else { + $expected = '3.0GBPS'; + } } else { warn "Should not be here. Do not know what to do with type '$type'\n"; next;