glensc / nagios-plugin-check_raid

Nagios/Icinga/Sensu plugin to check current server's RAID status ⛺
144 stars 84 forks source link

check_raid with hpacucli reports UNKNOWN for failed RAID 0 array #187

Open danci1973 opened 5 years ago

danci1973 commented 5 years ago

Output of check_raid -d:

check_raid 4.0.8-16-gf84a823
Visit <https://github.com/glensc/nagios-plugin-check_raid#reporting-bugs> how to report bugs
Please include output of **ALL** commands in bugreport

DEBUG EXEC: /usr/sbin/hpacucli controller all show status at ./check_raid line 503.
DEBUG EXEC: /usr/sbin/hpacucli controller slot=0 logicaldrive all show at ./check_raid line 503.
DEBUG EXEC: /usr/sbin/hpacucli controller slot=1 logicaldrive all show at ./check_raid line 503.
UNKNOWN: hpacucli:[Smart Array P420i[OK]: Array A(OK)[LUN1:OK], Array B(OK)[LUN2:OK], Array C(OK)[LUN3:Failed], Smart Array P410[OK, Not configured]]

Output of each command from check_raid -d

/usr/sbin/hpacucli controller all show


Smart Array P410 in Slot 1                (sn: PACCRID12410GJR)
Smart Array P420i in Slot 0 (Embedded)    (sn: 5001438023BA0ED0)

/usr/sbin/hpacucli controller slot=0 logicaldrive all show


Smart Array P420i in Slot 0 (Embedded)

   array A

      logicaldrive 1 (93.1 GB, RAID 1, OK)

   array B

      logicaldrive 2 (931.5 GB, RAID 1, OK)

   array C

      logicaldrive 3 (931.5 GB, RAID 0, Failed)

/usr/sbin/hpacucli controller slot=1 logicaldrive all show


Error: The specified device does not have any logical drives.

Additional environment details:

Unfortunately I have no way of testing whether removing the 2nd, unused RAID controller would change the behavior.

danci1973 commented 5 years ago

Just found out that adding --plugin-option=hpacucli-target=slot=0 helps, so that exit state is now CRITICAL.

Shouldn't exit state be CRITICAL whenever at least one array is found to be failed?