From 10245f35c145c9620420b92497ce8f25725925cf Mon Sep 17 00:00:00 2001 From: Faidon Liambotis Date: Mon, 29 May 2017 20:17:25 +0300 Subject: [PATCH] raid/hpssacli: WARN on permanently disabled cache Commit 2f4db17df6b239dbe91da46779fd0c723bfdc14d skipped the Cache Status line of "controller slot=N show status", in an effort to make it not warn on HP SSD Smart Path configurations where Cache Status was set to "Not Configured". We were checking instead the LD Acceleration Status for each logical drive, which was indicative in the past. We have now seen a case out in the wild where Cache Status is set to "Permanently Disabled", indicative of an issue with the hardware's battery, but LDs all report "LD Acceleration Status: Controller Cache" and "Caching: Enabled". Change the Cache Status check to explicitly check for "OK" or "Not Configured" and otherwise emit a WARNING. Signed-off-by: Faidon Liambotis --- dsa-nagios-checks/checks/dsa-check-hpssacli | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dsa-nagios-checks/checks/dsa-check-hpssacli b/dsa-nagios-checks/checks/dsa-check-hpssacli index 959198e..d10874b 100755 --- a/dsa-nagios-checks/checks/dsa-check-hpssacli +++ b/dsa-nagios-checks/checks/dsa-check-hpssacli @@ -309,8 +309,14 @@ for my $slot (sort @controllers) { my $system = $1; my $status = $2; - # skip the cache check, we track the LD Acceleration Method above - next if ($system eq 'Cache'); + if ($system eq 'Cache') { + # Can be: + # - 'OK' + # - 'Not Configured' (for e.g. HP SSD Smart Path) + # - 'Permanently Disabled' + # - ...? + next if $status =~ /^(OK|Not Configured)$/; + } push @{$status{$status}}, $system; if ($status ne 'OK') { -- 2.20.1