check_storcenter

Last update: March 11, 2019

With this plugin you can do several checks on your EMC/Iomega StorCenter NAS.

The plugin successfully works on a px4-300r. Please let me know wheter or not it works for another model, too.

End of life warning

EOL

As I don't have any StorCenter devices around to test further development, this plugin is end of life. Use as is.

Download

Download check_storcenter.sh

check_storcenter.sh

5226 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.

Compatibility matrix

The plugin has been successfully tested on the following StorCenter devices:

  • px4-300r: All checks work
  • ix2/ix2-200: mem check does not work

Version history / Changelog

20111010 Created plugin (types: disk, raid, cpu, mem)
20111011 Added info type
20111013.0 Corrected uptime (but device returns strange value?)
20111013.1 Corrected uptime (using hrSystemUptime.0 now)
20111020 Disk type now doesnt return CRITICAL anymore if disks are missing
20111031 Using vqeU in mem type (if response comes with kB string) - corrects mem check
20140120 Added snmp authentication

Requirements

  • SNMP needs to be enabled on the NAS. To activate SNMP, do the following steps:
    Log on to your StorCenter NAS and select Network -> Protocols -> SNMP.
    Set username (e.g. nagios) and a password
  • The following shell commands must exist and be executable by your Nagios user: snmpwalk, tr

Definition of the parameters

Parameter Description
-H* Hostname or IP address of StorCenter NAS
-U* Username you have defined in the SNMP settings of StorCenter
-P* Password you have defined in the SNMP settings of StorCenter
-t* Type of check you want to do (see the definition of types further down)
-w Warning threshold (optional and only in combination with certain types)
-c Critical threshold (optional and only in combination with certain types)
--help Help text for correct usage of this script

* mandatory parameters

Definition of the check types

Check Type Description
disk Checks hard disks for their current status
raid Checks the RAID status
cpu Check current CPU load (thresholds possible)
mem Check current memory (RAM) utilization (thresholds possible)
info Outputs some general information of the device

Usage / running the plugin on the command line

Usage:

./check_storcenter.sh -H host -U user -P pass -t type [-w warning] [-c critical]

Examples:

./check_storcenter.sh -H mynas -U nagios -P secret -t disk

./check_storcenter.sh -H mynas -U nagios -P secret -t cpu -w 20 -c 30

Command definition

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

# 'check_storcenter' command definition
define command{
command_name check_storcenter
command_line $USER1$/check_storcenter -H $HOSTADDRESS$ -U $ARG1$ -t $ARG2$ $ARG3$
}

Command definition in Icinga 2.x

object CheckCommand "check_storcenter" {
  import "plugin-check-command"

  command = [ PluginContribDir + "/check_storcenter.sh" ]

  arguments = {
    "-H" = {
      value = "$storcenter_host$"
    }
    "-U" = {
      value = "$storcenter_username$"
    }
    "-P" = {
      value = "$storcenter_password$"
    }
    "-t" = {
      value = "$storcenter_checktype$"
    }
    "-w" = {
      value = "$storcenter_warning$"
    }
    "-c" = {
      value = "$storcenter_critical$"
    }
  }

  vars.storcenter_host = "$address$"
}

Service definition

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

# Check StorCenter Disk
define service{
use generic-service
host_name nas1
service_description Disk Status
check_command check_storcenter!nagios!disk
}

# Check StorCenter Raid
define service{
use generic-service
host_name nas1
service_description Raid Status
check_command check_storcenter!nagios!raid
}

# Check StorCenter CPU
define service{
use generic-service
host_name nas1
service_description CPU Load
check_command check_storcenter!nagios!cpu
}

In the following example, the username 'nagios' is used and the check type is 'mem'. The thresholds are normal integers and represent the percentage of memory usage. A warning notification will be sent if the memory usage is higher or equal to 50%, a critical notification at 90%.

# Check StorCenter Memory (RAM)
define service{
use generic-service
host_name nas1
service_description Memory Usage
check_command check_storcenter!nagios!mem!-w 50 -c 90
}

# Check StorCenter Information
define service{
use generic-service
host_name nas1
service_description Information
check_command check_storcenter!nagios!info
}

Service object definition Icinga 2.x

# Check Storcenter Disk Status
object Service "Disk Status" {
  import "generic-service"
  host_name "nas1"
  check_command = "check_storcenter"
  vars.storcenter_checktype = "disk"
}

# Check Storcenter CPU Load
object Service "CPU Load" {
  import "generic-service"
  host_name "nas1"
  check_command = "check_storcenter"
  vars.storcenter_checktype = "cpu"
}

Screenshots

check_storcenter NAS