From 2f4db17df6b239dbe91da46779fd0c723bfdc14d Mon Sep 17 00:00:00 2001 From: Faidon Liambotis Date: Thu, 2 Jun 2016 15:24:05 +0300 Subject: [PATCH] hpssacli: don't barf on HP SSD Smart Path configs On systems with SSD arrays, one of the recommended HP configurations -and as far as I know, the default- is to disable the BBU cache and use a technology that's instead called "HP SSD Smart Path". In these cases, dsa-check-hpssacli warns, as "controller slot=N show status" returns "Cache: Not Configured", despite this being a valid configuration. It turns out that there is another field, per LD, called "LD Acceleration Method" that can get the values of "Controller Cache", "HP SSD Smart Path" or "All disabled"; the first two being OK, the latter one indicative of a problem. Switch the check to use those instead. I've yet to see a controller with a failed or misconfigured cache, so I'm not entirely sure that a config with "LD Acceleration Method: Controller Cache" and "Cache: Not Configured" would not occur. That wouldn't make any sense though, so let's risk it :) Signed-off-by: Julien Cristau --- dsa-nagios-checks/checks/dsa-check-hpssacli | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/dsa-nagios-checks/checks/dsa-check-hpssacli b/dsa-nagios-checks/checks/dsa-check-hpssacli index 4f97a52..959198e 100755 --- a/dsa-nagios-checks/checks/dsa-check-hpssacli +++ b/dsa-nagios-checks/checks/dsa-check-hpssacli @@ -149,6 +149,14 @@ for my $slot (sort @controllers) { record('UNKNOWN'); } } + if (/^ *LD Acceleration Method: (.*)$/) { + my $status = $1; + # can at least be "Controller Cache" or HP SSD Smart Path", both OK + if ($status eq 'All disabled') { + push @{$status{'Acceleration method'}}, "LD$logicaldrive disabled"; + record('WARNING'); + } + } } } @@ -300,9 +308,12 @@ for my $slot (sort @controllers) { if (/^ *(.*) Status: (.*)$/) { my $system = $1; my $status = $2; + + # skip the cache check, we track the LD Acceleration Method above + next if ($system eq 'Cache'); + push @{$status{$status}}, $system; if ($status ne 'OK') { - next if ($params->{'no-battery'} && $system eq 'Cache'); next if ($params->{'no-battery'} && $system eq 'Battery/Capacitor'); record('WARNING'); }; -- 2.20.1