Nagios Exchange Nagios Exchange
  • Home
  • Directory
  • Library
  • Support
  • About

Advanced Search

Build precise queries to find exactly what you need

Search Logic

Select compatible versions

Press ESC to close

Sign In Sign Up
  • Home
  • Directory
  • Library
  • Support
  • About
Plugins4391Themes and Skins11Add-ons741Documentation283Graphics and Logos36View All Categories
LinuxSecuritySNMPFile SystemCloud
New Listings Recently Updated Listings Most Favored Listings Most Popular Listings Most Rated Listings Most Reviewed Listings
Random Project
Web Servers check_nginx_stats.pl (Advanced Nagios Plugins Collection)
0.0 (0)
35.5K
RSS Feed
Newest Listings Updated Listings
Top Contributors
Julien DESMAREST (6)Yoann LAMY (6)Davide Lemma (4)deskwork_itunes142 (4)Claudio Kuenzler (2)
See More
Newest Contributors
sowoii (1)Nitatemic (1)cjdepaul (1)ixs (1)messefreeze (2)
See More

Copyright © 2009-2025 Nagios Enterprises, LLC. All rights reserved.

Privacy PolicyTerms of UseTrademarks
Home > Benjamin Steinwender
BS

Benjamin Steinwender

@steinweb

User Stats

Member Since: November 4, 2014

Favorites0

Views

Projects0

No Projects Found
check_IBM_DS_health

additional parameters

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/5x00 Health Check" echo "the script requires IP of at least one DS4x00/5x00 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')

Reviewed 11 years ago

No Favorites Found

Copyright © 2009-2025 Nagios Enterprises, LLC. All rights reserved.

Privacy PolicyTerms of UseTrademarks
Home Browse Submit Profile