Build precise queries to find exactly what you need
Press ESC to close
Hi there, thanks for providing this script. It also works on my DS3400 and DS3512 boxes.
I recently got a DS3512 which (somehow) requires a monitor/administrator password. I didn’t want to provide the password in the script, but rather as parameter on the command line. Thus, I just forward any additional parameters directly to SMcli. Here’s my modification to the script:
# diff -u /scripts/check_IBM_DS_health_1.5.sh-orig /scripts/check_IBM_DS_health_1.5.sh — /scripts/check_IBM_DS_health_1.5.sh-orig 2014-11-04 16:54:45.000000000 +0100 +++ /scripts/check_IBM_DS_health_1.5.sh 2014-11-04 17:44:38.000000000 +0100 @@ -27,7 +27,7 @@ #########################################################
#SMcli location -COMMAND=/opt/IBM_DS/client/SMcli +COMMAND=”sudo /opt/IBM_DS/client/SMcli”
# Define Nagios return codes # @@ -45,12 +45,14 @@ echo “IBM DS4x00/5×00 Health Check” echo “the script requires IP of at least one DS4x00/5×00 Controller, second is optional” echo “” – echo “Usage check_IBM_health.sh -a X.X.X.X -b X.X.X.X” + echo “Usage check_IBM_health.sh -a X.X.X.X -b X.X.X.X […]” echo “” echo ” -h Show this page” echo ” -a IP of Controller A” echo ” -b IP of Controller B” echo “” + echo ” additional parameters are forwarded to SMcli” + echo “” exit 0 }
@@ -78,10 +80,10 @@ shift CTRLB_IP=$1 ;; +# pass unknown commands to SMcli *) – echo “Unknown argument: $1″ – print_help – exit $STATE_UNKNOWN + PAR=”$@” + break ;; esac shift @@ -92,7 +94,7 @@ #
##execute SMcli -RESULT=$($COMMAND $CTRLA_IP $CTRLB_IP -c “show storageSubsystem healthStatus;”) +RESULT=$($COMMAND $CTRLA_IP $CTRLB_IP $PAR -c “show storageSubsystem healthStatus;”)
##filter unnecessary SMcli output RESULT=$(echo $RESULT |sed ‘s/Performing syntax check…//g’ | sed ‘s/Syntax check complete.//g’ | sed ‘s/Executing script…//g’ | sed ‘s/Script execution complete.//g’| sed ‘s/SMcli completed successfully.//g’ | sed ‘s/The controller clocks in the storage subsystem are out of synchronization with the storage management station.//g’ | sed ‘s/ Controller in Slot [AB]://g’ | sed ‘s/Storage Management Station://g’ | sed ‘s/\s\s[0-9]{2}s[0-9]{2}:[0-9]{2}:[0-9]{2}s(CEST|CET)s[0-9]{4}//g’)
We’ve completely redesigned the world’s largest repository of Nagios plugins and monitoring tools. Join thousands of users sharing monitoring solutions for servers, applications, and everything in between.
Due to our redesign, all existing accounts require a password reset to access your account again.
Ready to explore 6,100+ projects and contribute to the community?
Reset Password Create Account
Happy Monitoring!