2013-04-14 // Nagios Monitoring - IBM TS3310 or Adic / Quantum Scalar i500 Tape Library
We use several IBM TS3310 tape libraries in our datacenters to store backup copies from several IBM TSM (Tivoli Storage Manager) instances. Some time ago i wrote a – rather crude – Nagios plugin to monitor the IBM TS3310 tape libraryies. Since the TS3310 is actually a IBM OEMed version of the ADIC (now Quantum) Scalar i500 tape library, i guess the Nagios plugin should also work for the ADIC/Quantum systems. In order to run the Nagios plugin, you need to have SNMP activated on the tape library. Also, a network connection from the Nagios system to the TS3310 device on port UDP/161 must be allowed.
The whole setup for monitoring IBM TS3310 – and probably ADIC/Quantum Scalar i500 – tape libraries setup looks like this:
Enable SNMP queries on the service processor of the TS3310. Login to the WebGUI and navigate to:
-> Manage Library -> Settings -> SNMP -> SNMP Community: <Enter the SNMP community string to access the TS3310> -> Check selection: "Enable SNMP v1 & v2" -> Submit Changes
Verify the port UDP/161 on the TS3310 device can be reached from the Nagios system.
Optional: Enable SNMP traps to be sent to the Nagios system from the service processor of the TS3310. This requires SNMPD and SNMPTT to be already setup on the Nagios system. Login to the WebGUI and navigate to:
-> Manage Library -> Settings -> SNMP Traps -> From the drop-down menu select: "Add ..." -> Go -> <Enter IP and UDP port of the Nagios systems SNMPD> -> OK
Verify the port UDP/162 on the Nagios system can be reached from the TS3310 devices.
Download the two Nagios plugins check_adic.sh and check_adic_drive.sh and place them in the plugins directory of your Nagios system, in this example
/usr/lib/nagios/plugins/
:$ mv -i check_adic.sh check_adic_drive.sh /usr/lib/nagios/plugins/ $ chmod 755 /usr/lib/nagios/plugins/check_adic.sh $ chmod 755 /usr/lib/nagios/plugins/check_adic_drive.sh
Adjust the plugins settings according to your environment. Edit the following variable assignments:
SNMPGETNEXT_ARGS="-On -v 1 -c public -t 15"
Define the following Nagios commands. In this example this is done in the file
/etc/nagios-plugins/config/check_adic.cfg
:# check ADIC tape library health define command { command_name check_adic command_line $USER1$/check_adic.sh -H $HOSTADDRESS$ } # check ADIC tape library drive health define command { command_name check_adic_drive command_line $USER1$/check_adic_drive.sh -H $HOSTADDRESS$ }
Verify that a generic check command for a running SNMPD is already present in your Nagios configuration. If not add a new check command like this:
define command { command_name check_snmpd command_line $USER1$/check_snmp -H $HOSTADDRESS$ -o .1.3.6.1.2.1.1.3.0 -P 1 -C public -t 30 }
Define a group of services in your Nagios configuration to be checked for each TS3310 device:
# check snmpd define service{ use generic-service hostgroup_name tapelib-ts3310 service_description Check_SNMPD check_command check_snmpd } # check ADIC tape library health define service{ use generic-service hostgroup_name tapelib-ts3310 service_description Check_ADIC_TL_Health check_command check_adic } # check ADIC tape library drive health define service{ use generic-service hostgroup_name tapelib-ts3310 service_description Check_ADIC_TL_Drives check_command check_adic_drive }
Replace
generic-service
with your Nagios service template.Define a service dependency to run the checks
Check_ADIC_TL_Health
andCheck_ADIC_TL_Drives
only if theCheck_SNMPD
was run successfully:# ADIC/TS3310 SNMPD dependencies define servicedependency{ hostgroup_name tapelib service_description Check_SNMPD dependent_service_description Check_ADIC_TL_.* execution_failure_criteria c,p,u,w notification_failure_criteria c,p,u,w }
Define a host in your Nagios configuration for the service processor of each TS3310 device. In this example its named
ts3310
:define host { use tapelib host_name ts3310 alias TS3310 Tape Library address 10.0.0.1 parents parent_lan }
Replace
tapelib
with your Nagios host template for tape library storage devices. Adjust theaddress
andparents
parameters according to your environment.Define a hostgroup in your Nagios configuration for all TS3310 devices. In this example it is named
tapelib-ts3310
. The above checks are run against each member of the hostgroup:define hostgroup { hostgroup_name tapelib-ts3310 alias Tape Libraries members ts3310 }
Run a configuration check and if successful reload the Nagios process:
$ /usr/sbin/nagios3 -v /etc/nagios3/nagios.cfg $ /etc/init.d/nagios3 reload
The new hosts and services should soon show up in the Nagios web interface.
If the optional step number 2 in the above list was done, SNMPTT also needs to be configured to be able to understand the incoming SNMP traps from TS3310 devices. This can be achieved by the following steps:
Download the SNMP MIB file from the WebGUI of the TS3310 (→
Manage Library
→Settings
→SNMP
→Download SNMP MIB File
), save the file asTS3310_MIB.mib
and transfer it to the Nagios server.Convert the SNMP MIB definitions in
TS3310_MIB.mib
into a format that SNMPTT can understand.$ /opt/snmptt/snmpttconvertmib --in=MIB/TS3310_MIB.mib --out=/opt/snmptt/conf/snmptt.conf.ibm-ts3310 ... Done Total translations: 17 Successful translations: 17 Failed translations: 0
The trap severity settings should be pretty reasonable by default, but you can edit them according to your requirements with:
$ vim /opt/snmptt/conf/snmptt.conf.ibm-ts3310
Add the new configuration file to be included in the global SNMPTT configuration and restart the SNMPTT daemon:
$ vim /opt/snmptt/snmptt.ini ... [TrapFiles] snmptt_conf_files = <<END ... /opt/snmptt/conf/snmptt.conf.ibm-ts3310 ... END $ /etc/init.d/snmptt reload
Download the Nagios plugin check_snmp_traps.sh and place it in the plugins directory of your Nagios system, in this example
/usr/lib/nagios/plugins/
:$ mv -i check_snmp_traps.sh /usr/lib/nagios/plugins/ $ chmod 755 /usr/lib/nagios/plugins/check_snmp_traps.sh
Define the following Nagios command to check for SNMP traps in the SNMPTT database. In this example this is done in the file
/etc/nagios-plugins/config/check_snmp_traps.cfg
:# check for snmp traps define command { command_name check_snmp_traps command_line $USER1$/check_snmp_traps.sh -H $HOSTNAME$:$HOSTADDRESS$ -u <user> -p <pass> -d <snmptt_db> }
Replace
user
,pass
andsnmptt_db
with values suitable for your SNMPTT database environment.Add another service in your Nagios configuration to be checked for each TS3310 device:
# check snmptraps define service{ use generic-service hostgroup_name tapelib-ts3310 service_description Check_SNMP_traps check_command check_snmp_traps }
Optional: Define a serviceextinfo to display a folder icon next to the
Check_SNMP_traps
service check for each TS3310 device. This icon provides a direct link to the SNMPTT web interface with a filter for the selected host:define serviceextinfo { hostgroup_name tapelib-ts3310 service_description Check_SNMP_traps notes SNMP Alerts #notes_url http://<hostname>/nagios3/nagtrap/index.php?hostname=$HOSTNAME$ #notes_url http://<hostname>/nagios3/nsti/index.php?perpage=100&hostname=$HOSTNAME$ }
Uncomment the
notes_url
depending on which web interface (nagtrap or nsti) is used. Replacehostname
with the FQDN or IP address of the server running the web interface.Run a configuration check and if successful reload the Nagios process:
$ /usr/sbin/nagios3 -v /etc/nagios3/nagios.cfg $ /etc/init.d/nagios3 reload
All done, you should now have a complete Nagios-based monitoring solution for your IBM TS3310 or ADIC/Quantum Scalar i500 devices.