nagios-nrpe: check_hpraid: Be sure that variables are bound
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
342810362d
commit
6126be95e3
|
@ -19,6 +19,13 @@ set -euo pipefail
|
||||||
# using HPE Smart Storage Administrator. It should support Debian 9 and over.
|
# using HPE Smart Storage Administrator. It should support Debian 9 and over.
|
||||||
# (Array, controller, cache, battery, etc...)
|
# (Array, controller, cache, battery, etc...)
|
||||||
#
|
#
|
||||||
|
# Known working RAID controllers:
|
||||||
|
#
|
||||||
|
# - Adaptec Smart Storage PQI 12G SAS/PCIe 3 (rev 01)
|
||||||
|
# | Smart Array P408i-a SR Gen10
|
||||||
|
# | Smart Array E208i-a SR Gen10
|
||||||
|
#
|
||||||
|
#
|
||||||
# NOTE:
|
# NOTE:
|
||||||
#
|
#
|
||||||
# You need to install the proprietary tool HPE Smart Storage Administrator (ssacli) from:
|
# You need to install the proprietary tool HPE Smart Storage Administrator (ssacli) from:
|
||||||
|
@ -241,6 +248,9 @@ if [ "$EXCLUDE_BATTERY" = "1" ]; then
|
||||||
check=$(grep -v 'Cache Status: Temporarily Disabled' "$check")
|
check=$(grep -v 'Cache Status: Temporarily Disabled' "$check")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
check=${check:-}
|
||||||
|
check2=${check2:-}
|
||||||
|
check3=${check3:-}
|
||||||
if grep -qiE Failed <<< "$check"; then
|
if grep -qiE Failed <<< "$check"; then
|
||||||
echo "RAID CRITICAL - HP Smart Array Failed: ${check}"
|
echo "RAID CRITICAL - HP Smart Array Failed: ${check}"
|
||||||
exit "$STATE_CRITICAL"
|
exit "$STATE_CRITICAL"
|
||||||
|
|
Loading…
Reference in a new issue