raid/hpssacli: check for cable errors/no batteries
authorFaidon Liambotis <paravoid@debian.org>
Mon, 29 May 2017 17:17:26 +0000 (20:17 +0300)
committerPaul Wise <pabs@debian.org>
Tue, 30 May 2017 03:10:18 +0000 (11:10 +0800)
commitd12a96228342f968b0bbd470d5cbdb71cc94081c
tree9cb57d968c401ccdd314d920d98f9d16924babbe
parent10245f35c145c9620420b92497ce8f25725925cf
raid/hpssacli: check for cable errors/no batteries

We had a case in the wild where the following "show status" resulted in an OK:
   Controller Status: OK
   Cache Status: Permanently Disabled

We already fixed the check to emit a WARNING when Cache Status is not
"OK" or "Not Configured" in a previous commit, but it seems there's
another thing we could check: "controller slot=N show detail". This had
a few more values we could check, and specifically:
   Cache Status Details: Cable Error
   Battery/Capacitor Count: 0

Emit CRITICAL for the former, and CRITICAL for the latter if the count
is 0 and the argument --no-battery hasn't been passed to us.

This is untested on systems that have no battery by design -- hopefully,
Cable Error won't be reported on these.

Signed-off-by: Faidon Liambotis <paravoid@debian.org>
dsa-nagios-checks/checks/dsa-check-hpssacli