From: Peter Palfrader Date: Tue, 19 Mar 2013 09:41:13 +0000 (+0100) Subject: dsa-check-hpacucli: new hpacucli changed case of transfer speed. Upcase all before... X-Git-Url: https://wiki.adam-barratt.org.uk/gitweb/?a=commitdiff_plain;h=a4857ac58e3fd0931cc0650172ec8ae4c49e89a1;p=mirror%2Fdsa-nagios.git dsa-check-hpacucli: new hpacucli changed case of transfer speed. Upcase all before comparing. --- diff --git a/dsa-nagios-checks/checks/dsa-check-hpacucli b/dsa-nagios-checks/checks/dsa-check-hpacucli index 8f62bb9..755a406 100755 --- a/dsa-nagios-checks/checks/dsa-check-hpacucli +++ b/dsa-nagios-checks/checks/dsa-check-hpacucli @@ -208,11 +208,11 @@ for my $slot (sort @controllers) { record('WARNING'); push @{$status{'unknown transfer speed'}}, $drive; } elsif (ref($expected) eq 'ARRAY') { - if (scalar(grep { $value{$key} eq $_ } @$expected) == 0) { + if (scalar(grep { uc($value{$key}) eq uc($_) } @$expected) == 0) { record('WARNING'); push @{$status{'bad transfer speed'}}, $drive."(".$value{$key}.")"; }; - } elsif ($value{$key} ne $expected) { + } elsif (uc($value{$key}) ne uc($expected)) { record('WARNING'); push @{$status{'bad transfer speed'}}, $drive."(".$value{$key}.")"; }; diff --git a/dsa-nagios-checks/debian/changelog b/dsa-nagios-checks/debian/changelog index 5f3ce20..1c52088 100644 --- a/dsa-nagios-checks/debian/changelog +++ b/dsa-nagios-checks/debian/changelog @@ -6,6 +6,8 @@ dsa-nagios-checks (9x) UNRELEASED; urgency=low [ Peter Palfrader ] * dsa-check-packages: work better with weird multi-arch cases. * dsa-check-hpacucli: print errors to stdout so that nrpe can read it. + * dsa-check-hpacucli: new hpacucli changed case of transfer speed. Upcase + all before comparing. -- Stephen Gran Sat, 29 Dec 2012 13:28:47 +0000