We use this Nagios plugin to monitor the status of our storage boxes IBM DS3400 and the Dell MD3200.
The plugin is based on the SMcli utility from IBM.
After upgrading the firmware on de MD3200, the old version of SMcli didn't work any more, so I needed a newer version.
Turns out this isn't very straightforward.
I needed some additional packages on our Ubuntu 12.04 64-bit host:
apt-get install libxi6 libxtst6 alien
Instead of jumping through hoops by going to http://www-933.ibm.com/support/fixcentral/, logging in (or creating an account first), picking menus, agreeing with stuff, etc, the actual software can be accessed directly:
http://delivery04.dhe.ibm.com/sar/CMA/SDA/04671/1/SM10.86_Linux_64bit_x86-64_SMIA-10.86.x5.43.tgz
Download and extract this on the Nagios host, then run the resulting installation blob:
./Linux_x64_10p86/Linux_x86-64/SMIA-LINUXX64-10.86.0A05.0043.bin
You will be presented with a console mode installer:
=============================================================================== Choose Locale... ---------------- 1- Bahasa Indonesia 2- Deutsch ->3- English 4- Español 5- Français 6- Italiano 7- Português (Brasil)
I picked English, then comes an insanely long stream of "PRESS <ENTER> TO CONTINUE" license agreements.
Eventually you can accept it, then it is time to choose which mode of install:
=============================================================================== Select Installation Type ------------------------ Please choose the Install Set to be installed by this installer. ->1- Typical (Full Installation) 2- Management Station 3- Host 4- Customize... ENTER THE NUMBER FOR THE INSTALL SET, OR PRESS <ENTER> TO ACCEPT THE DEFAULT
I picked Management Station, because that's what Nagios resembles most I think. Confirm:
Pre-Installation Summary ------------------------ Please Review the Following Before Continuing: Install Folder: /opt/IBM_DS Required Disk Space 811 MB Available Disk Space 1,363 MB PRESS <ENTER> TO CONTINUE:
Once this is all done, go to /opt/IBM_DS, then convert the Redhat RPM into a tarball, then extract the contents of that again:
cd /opt/IBM_DS alien -v -c -t SMclient.rpm mkdir tmp tar -C tmp -xvf SMclient-10.86.0G05.0043.tgz
There's loads of stuff, but the only directory that is relevant here, is the only containing the SMcli scripts and the jars:
root@nagios:/opt/IBM_DS# ll tmp/opt/IBM_DS/client/ total 277784 dr-xr-xr-x 3 root root 4096 Oct 10 20:56 ./ drwxr-xr-x 3 root root 4096 Dec 19 17:12 ../ -r-x------ 1 root root 781 Oct 10 20:48 asyncRVMUtil* -r--r--r-- 1 root root 4645 Oct 10 20:48 client_icon.png -r--r--r-- 1 root root 309293 Oct 10 20:49 jcommon.jar -r--r--r-- 1 root root 1425744 Oct 10 20:49 jfreechart.jar -r--r--r-- 1 root root 589910 Oct 10 20:49 jhall.jar -r--r--r-- 1 root root 8020 Oct 10 20:48 license.txt dr-x------ 3 root root 4096 Oct 10 20:48 monitor/ -r--r--r-- 1 root root 2960757 Oct 10 20:49 sam217.ibm.files.jar -r--r--r-- 1 root root 3931456 Oct 10 20:49 sam217.ibm.jar -r--r--r-- 1 root root 3188441 Oct 10 20:49 sam250.ibm.files.jar -r--r--r-- 1 root root 4272117 Oct 10 20:49 sam250.ibm.jar -r--r--r-- 1 root root 3209783 Oct 10 20:49 sam270.ibm.files.jar -r--r--r-- 1 root root 4290653 Oct 10 20:50 sam270.ibm.jar -r--r--r-- 1 root root 1615664 Oct 10 20:50 sam910.ibm.files.jar -r--r--r-- 1 root root 2623874 Oct 10 20:50 sam910.ibm.jar -r--r--r-- 1 root root 8058768 Oct 10 20:50 sam912.ibm.files.jar -r--r--r-- 1 root root 11031370 Oct 10 20:50 sam912.ibm.jar -r--r--r-- 1 root root 4326184 Oct 10 20:50 sam914.ibm.files.jar -r--r--r-- 1 root root 5874100 Oct 10 20:50 sam914.ibm.jar -r--r--r-- 1 root root 2265562 Oct 10 20:51 sam916_2.ibm.files.jar -r--r--r-- 1 root root 3060561 Oct 10 20:51 sam916_2.ibm.jar -r--r--r-- 1 root root 2279733 Oct 10 20:51 sam916.ibm.files.jar -r--r--r-- 1 root root 3022512 Oct 10 20:51 sam916.ibm.jar -r--r--r-- 1 root root 2271560 Oct 10 20:51 sam923.ibm.files.jar -r--r--r-- 1 root root 3059593 Oct 10 20:51 sam923.ibm.jar -r--r--r-- 1 root root 2271697 Oct 10 20:51 sam960.ibm.files.jar -r--r--r-- 1 root root 3064088 Oct 10 20:51 sam960.ibm.jar -r--r--r-- 1 root root 6208296 Oct 10 20:51 samALLEGHENY.ibm.files.jar -r--r--r-- 1 root root 5414892 Oct 10 20:51 samALLEGHENY.ibm.jar -r--r--r-- 1 root root 6100226 Oct 10 20:51 samAURORA.ibm.files.jar -r--r--r-- 1 root root 5122021 Oct 10 20:52 samAURORA.ibm.jar -r--r--r-- 1 root root 7594517 Oct 10 20:52 samCHESSIE2.ibm.files.jar -r--r--r-- 1 root root 7306331 Oct 10 20:52 samCHESSIE2.ibm.jar -r--r--r-- 1 root root 7399213 Oct 10 20:52 samCHESSIE.ibm.files.jar -r--r--r-- 1 root root 6048267 Oct 10 20:52 samCHESSIE.ibm.jar -r--r--r-- 1 root root 3618506 Oct 10 20:52 samCRYSTAL.ibm.files.jar -r--r--r-- 1 root root 4699235 Oct 10 20:53 samCRYSTAL.ibm.jar -r--r--r-- 1 root root 3618428 Oct 10 20:53 samCRYSTALM.ibm.files.jar -r--r--r-- 1 root root 4780961 Oct 10 20:53 samCRYSTALM.ibm.jar -r--r--r-- 1 root root 4308833 Oct 10 20:53 samEMERALD.ibm.files.jar -r--r--r-- 1 root root 5068071 Oct 10 20:53 samEMERALD.ibm.jar -r--r--r-- 1 root root 4311417 Oct 10 20:53 samEMERALDM1.ibm.files.jar -r--r--r-- 1 root root 5046296 Oct 10 20:53 samEMERALDM1.ibm.jar -r--r--r-- 1 root root 9066021 Oct 10 20:53 samERIE.ibm.files.jar -r--r--r-- 1 root root 7395216 Oct 10 20:54 samERIE.ibm.jar -r--r--r-- 1 root root 3626781 Oct 10 20:54 samEXMOOR.ibm.files.jar -r--r--r-- 1 root root 5070420 Oct 10 20:54 samEXMOOR.ibm.jar -r--r--r-- 1 root root 12333283 Oct 10 20:56 samFREMONT1.ibm.files.jar -r--r--r-- 1 root root 10093231 Oct 10 20:56 samFREMONT1.ibm.jar -r--r--r-- 1 root root 11761995 Oct 10 20:55 samFREMONT.ibm.files.jar -r--r--r-- 1 root root 9888004 Oct 10 20:55 samFREMONT.ibm.jar -r--r--r-- 1 root root 8046349 Oct 10 20:56 samSNOWMASS.ibm.files.jar -r--r--r-- 1 root root 5849311 Oct 10 20:56 samSNOWMASS.ibm.jar -r--r--r-- 1 root root 7606650 Oct 10 20:56 sevenzip.jar -r-x------ 1 root root 970 Oct 10 20:48 SMcli* -r-x------ 1 root root 1156 Oct 10 20:48 SMclient* -r--r--r-- 1 root root 26270459 Oct 10 20:49 SMclient.jar -r--r--r-- 1 root root 126966 Oct 10 20:56 swing_layout.jar -r--r--r-- 1 root root 1447793 Oct 10 20:56 swingx.jar
Change the permissions of the SMcli* files:
chmod 755 tmp/opt/IBM_DS/client/SMcli chmod 755 tmp/opt/IBM_DS/client/SMclient
Edit tmp/opt/IBM_DS/client/SMcli so that it instead of this:
#!/bin/sh # # Script: SMcli-1 # Instance: 4 # %version: BDC~22 % # Description: # %created_by: raghuvet % # %date_created: Thu Sep 27 20:42:38 2012 % # Revised on Sept 6 2001 by jhouston to remove green thread flag # SMcli startup script BASEDIR=/opt/IBM_DS JAVA_EXEC=$BASEDIR/jre/bin/java
It uses the default java binary:
#!/bin/sh # # Script: SMcli-1 # Instance: 4 # %version: BDC~22 % # Description: # %created_by: raghuvet % # %date_created: Thu Sep 27 20:42:38 2012 % # Revised on Sept 6 2001 by jhouston to remove green thread flag # SMcli startup script BASEDIR=/opt/IBM_DS JAVA_EXEC=/usr/bin/java
I moved the client dir up and trashed all the other stuff:
cd /opt/IBM_DS mv tmp/opt/IBM_DS/client ~ rm -rf * mv ~/client .
Edit the check_IBM_DS_health
script so that it uses the right command:
#SMcli location COMMAND=/opt/IBM_DS/client/SMcli
I had to add back the 'quick' option to the Nagios script, otherwise it would give me a warning:
#RESULT=$($COMMAND $CTRLA_IP $CTRLB_IP -c "show storageSubsystem healthStatus;") RESULT=$($COMMAND $CTRLA_IP $CTRLB_IP -c 'show storageSubsystem healthStatus;' -quick)
At this stage the plugin would correctly work again for the DS3400 and the MD3200.