hpssacli: don't barf on SATA + 6Gbps speed
authorFaidon Liambotis <paravoid@debian.org>
Thu, 2 Jun 2016 12:24:04 +0000 (15:24 +0300)
committerJulien Cristau <jcristau@debian.org>
Thu, 2 Jun 2016 17:05:59 +0000 (19:05 +0200)
SATA 3.0 actually supports an 6.0Gbps rate and I've encountered systems
out there with disks at such a speed. dsa-check-hpssacli currently warns
about them because it seems to support only up to 3.0Gbps. Add support
for an "6.0Gbps" value.

SATA 3.2 goes up to 16Gbps but I have not seen this in the wild yet, so
it's unknown how hpssacli would display such a thing. Avoid guessing for
now.

Signed-off-by: Julien Cristau <jcristau@debian.org>
dsa-nagios-checks/checks/dsa-check-hpssacli

index 220d65b..4f97a52 100755 (executable)
@@ -245,7 +245,7 @@ for my $slot (sort @controllers) {
                } elsif ($type eq 'SAS' || $type eq 'SAS+') {
                        $key = 'PHY Transfer Rate';
                        if ($value{'Interface Type'} eq 'SATA') {
-                               $expected = [ '1.5Gbps', '3.0Gbps' ];
+                               $expected = [ '1.5Gbps', '3.0Gbps', '6.0Gbps' ];
                        } elsif ($value{'PHY Count'} eq '2') {
                                if (defined($value{'Redundant Path(s)'})) {
                                        $expected = [ '3.0GBPS, 3.0GBPS', '6.0GBPS, 6.0GBPS',