monitoring plugin check_ibm_ts_tape

Last update: December 08, 2020

This plugin is used to check an IBM System Storage TS Tape Library. It checks for the current status (GlobalStatus), the cleaning status of the tape drives, and outputs some basic information as serial number or firmware version.

End of life warning

EOL

As I don't have any IBM System Storage Tape Libraries around to test further development, this plugin is end of life. Use as is.

Commercial support

If you are looking for commercial support for this monitoring plugin, need customized modifications or in general customized monitoring plugins, contact us at Infiniroot.com.

Download

Download check_ibm_ts_tape.pl

check_ibm_ts_tape.pl

8332 downloads so far...

Download plugin and save it in your Nagios/Monitoring plugin folder (usually /usr/lib/nagios/plugins, depends on your distribution). Afterwards adjust the permissions (usually chmod 755).

Community contributions welcome on GitHub repo.

Version history / Changelog

20120316 Finished first version (my very first perl script, yay!)
20120822 Tape Drive needs cleaning with different code (22)
20120901 Different approach to check for cleaning state
20140826 Add support for TS3310 and move all variable declaration to top -remove excess "my" (by Nick Jeffrey)

Requirements

  • Perl
  • SNMP (v1) must be enabled on the tape library (should usually be already activated by default)

Definition of the parameters

Parameter Description
-H* Hostname or IP address of tape library
-C SNMP community name (default: public)
-m* Model of the tape library. Must be either ts3100, ts3200 or ts3310.
-t* Type to check. See below for valid types.
--help Show help/usage

* mandatory parameter

Definition of the check types

Type Description
info Show basic information of the tape library (hostname, serial number, etc)
status Checks the current status and outputs error codes if status is not ok
clean Checks all drives of tape library if cleaning is required

Usage / running the plugin on the command line

Usage:

./check_ibm_ts_tape.pl -H host [-C community] -m model -t checktype

Example:

./check_ibm_ts_tape.pl -H 10.100.72.100 -C readonly -m ts3200 -t clean
ts3200 OK - All tape drives are clean

Command definition

Command definition in Nagios, Icinga 1.x, Shinken, Naemon

# check_ibm_ts_tape command definition
define command {
  command_name check_ibm_ts_tape
  command_line $USER1$/check_ibm_ts_tape.pl -H $HOSTADDRESS$ -C $ARG1$ -m $ARG2$ -t $ARG3$
}

Command definition in Icinga 2.x

object CheckCommand "check_ibm_ts_tape" {
  import "plugin-check-command"
  command = [ PluginContribDir + "/check_ibm_ts_tape.pl" ]

   arguments = {
      "-H" = {
        value = "$ibm_ts_address$"
      }

      "-C" = {
        value = "$ibm_ts_community$"
      }

      "-m" = {
        value = "$ibm_ts_model$"
      }

      "-t" = {
        value = "$ibm_ts_checktype$"
      }
  }

  vars.ibm_ts_address = "$address$"
  vars.ibm_ts_community = "public"
}

Service definition

Service definition in Nagios, Icinga 1.x, Shinken, Naemon

In this example, the basic information of a TS3200 tape library will be shown.

# Check IBM Tape Library Info
define service{
  use generic-service
  host_name ibm-ts-library1
  service_description Info
  check_command check_ibm_ts_tape!public!ts3200!info
}

The most important check is the global status of the tape library. If there's an error, you will be notified with this check. It also outputs the error code and error description.

# Check IBM Tape Library Global Status
define service{
  use generic-service
  host_name ibm-ts-library1
  service_description Global Status
  check_command check_ibm_ts_tape!public!ts3200!status
}

In this example, a TS3100 is checked (note the ts3100 argument). All tape drives are checked for their current status. In case at least one drive needs to be cleaned, this check will alert you.

# Check IBM Tape Library Cleaning Status
define service{
  use generic-service
  host_name ibm-ts-library2
  service_description Cleaning Status
  check_command check_ibm_ts_tape!public!ts3100!clean
}

Service object definition Icinga 2.x

# Check IBM Tape Library Cleaning Status
object Service "Tape Cleaning Status" {
  import "generic-service"
  host_name = "ibm-ts-library2"
  check_command = "check_ibm_ts_tape"
  vars.ibm_ts_checktype = "clean"
}

Screenshots

Monitor IBM TS Tape Library
IBM Tape Library to clean