Error handling

Thank you for writing the plugin. It’s working with DS3400 and DS3300, but it did not notice all errors.
This error:
The following failures have been found:
Unreadable sector(s) detected
Storage Subsystem: DS3300
Unreadable sectors detected: 1

gave me the output (null).

you must change

*failure*)
case “$RESULT” in
*failed*|*Failed*)
echo $RESULT
echo “CRITICAL”
exit $STATE_CRITICAL
;;

to

*failure*)
case “$RESULT” in
*failed*|*Failed*|*failures*)
echo $RESULT
echo “CRITICAL”
exit $STATE_CRITICAL
;;

for the right output like this.

The following failures have been found: Unreadable sector(s) detected Storage Subsystem: DS3300 Unreadable sectors detected: 1
CRITICAL