X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;ds=sidebyside;f=dsa-nagios-checks%2Fchecks%2Fdsa-check-hpacucli;h=fcb4a342977a99e4b3580e85bb01d41e6b9dc24c;hb=397767fff5c67666d959a2efc5791be74d92168e;hp=bf2fb17ed8a42a0572b5701b195084de2d6d5128;hpb=80bda3ef9cecb26888445f5e63fd471bf637bcb1;p=mirror%2Fdsa-nagios.git diff --git a/dsa-nagios-checks/checks/dsa-check-hpacucli b/dsa-nagios-checks/checks/dsa-check-hpacucli index bf2fb17..fcb4a34 100755 --- a/dsa-nagios-checks/checks/dsa-check-hpacucli +++ b/dsa-nagios-checks/checks/dsa-check-hpacucli @@ -108,6 +108,7 @@ for my $slot (sort @controllers) { next if /^$/; next if (/^\S.*in Slot $slot/); next if /^ *array [A-Z]$/; + next if /^ *unassigned/; if (/^ *(array [A-Z]) \(Failed\)$/) { record('CRITICAL'); push @{$status{'Failed'}}, $1; @@ -179,23 +180,17 @@ for my $slot (sort @controllers) { push @{$status{'unknown transfer mode'}}, $drive."(".$value{'Transfer Mode'}.")"; next; }; - } elsif ($type eq 'SAS') { + } elsif ($type eq 'SAS' || $type eq 'SAS+') { $key = 'PHY Transfer Rate'; if ($value{'PHY Count'} eq '2') { if (defined($value{'Redundant Path(s)'})) { - $expected = '3.0GBPS, 3.0GBPS'; + $expected = [ '3.0GBPS, 3.0GBPS', '6.0GBPS, 6.0GBPS' ]; } else { - $expected = [ '3.0GBPS, Unknown', 'Unknown, 3.0GBPS' ]; + $expected = [ '3.0GBPS, Unknown', 'Unknown, 3.0GBPS', + '6.0GBPS, Unknown', 'Unknown, 6.0GBPS' ]; } } else { - $expected = '3.0GBPS'; - } - } elsif ($type eq 'SAS+') { - $key = 'PHY Transfer Rate'; - if ($value{'PHY Count'} eq '2') { - $expected = '6.0GBPS, Unknown'; - } else { - $expected = '6.0GBPS'; + $expected = [ '3.0GBPS', '6.0GBPS' ]; } } else { warn "Should not be here. Do not know what to do with type '$type'\n";