From 3df468f6833f2b02f7fe597dde61fc8bc33c8573 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Sat, 3 Jul 2010 16:24:39 +0100 Subject: [PATCH] Update check-hpacucli to deal with dual domain and 6GBPS SAS --- dsa-nagios-checks/checks/dsa-check-hpacucli | 15 ++++++++++++++- dsa-nagios-checks/debian/changelog | 5 ++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/dsa-nagios-checks/checks/dsa-check-hpacucli b/dsa-nagios-checks/checks/dsa-check-hpacucli index 06c6fad..ef79db8 100755 --- a/dsa-nagios-checks/checks/dsa-check-hpacucli +++ b/dsa-nagios-checks/checks/dsa-check-hpacucli @@ -126,6 +126,8 @@ for my $slot (sort @controllers) { $type = 'SCSI'; } elsif ($drive =~ /^[0-9]+[EI]:[0-9]+:[0-9]+$/) { # SAS $type = 'SAS'; + } elsif ($drive =~ /^[0-9]+[C]:[0-9]+:[0-9]+$/) { # New 6GBPS SAS + $type = 'SAS+'; } else { # I'm not going to run pass arguments of unknown form to the shell.. warn ("Unknown diskdrive ID $drive\n"); @@ -164,10 +166,21 @@ for my $slot (sort @controllers) { } elsif ($type eq 'SAS') { $key = 'PHY Transfer Rate'; if ($value{'PHY Count'} eq '2') { - $expected = '3.0GBPS, Unknown'; + if (defined($value{'Redundant Path(s)'})) { + $expected = '3.0GBPS, 3.0GBPS'; + } else { + $expected = '3.0GBPS, Unknown'; + } } 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'; + } } else { warn "Should not be here. Do not know what to do with type '$type'\n"; next; diff --git a/dsa-nagios-checks/debian/changelog b/dsa-nagios-checks/debian/changelog index f7d4c7b..50a8da5 100644 --- a/dsa-nagios-checks/debian/changelog +++ b/dsa-nagios-checks/debian/changelog @@ -16,7 +16,10 @@ dsa-nagios-checks (8X) unstable; urgency=low * dsa-check-zone-rrsig-expiration-many: also allow checking of geozones. * dsa-check-dnssec-delegation: allow multiple dirs to be checked. - -- Peter Palfrader Sat, 26 Jun 2010 12:11:51 +0200 + [ Stephen Gran ] + * Update check-hpacucli to deal with dual domain and 6GBPS SAS + + -- Stephen Gran Sat, 03 Jul 2010 16:23:58 +0100 dsa-nagios-checks (86) unstable; urgency=low -- 2.20.1