[project @ steve@lobefin.net-20090220020630-8k0anuy6jox1goe6]
[mirror/dsa-nagios.git] / dsa-nagios-nrpe-config / dsa-check-hpacucli
index a3c42c7..a347388 100755 (executable)
@@ -119,6 +119,8 @@ for my $slot (sort @controllers) {
        # Check that all drives have the proper transfer speed.
        # sometimes stuff breaks and they fall back to 10mb/sec.
        for my $drive (@drives) {
+               # skip drives that are known to have failed
+               next if (exists $status{'Failed'} && grep {$drive eq $_} @{$status{'Failed'}});
                my $type;
                if ($drive =~ /^[0-9]+:[0-9]+$/) { # scsi drives
                        $type = 'SCSI';
@@ -161,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;