Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_storcenter
20140120
2014-01-20
- Nagios 1.x
- Nagios 2.x
- Nagios 3.x
- Nagios 4.x
- Nagios XI
GPL
93703
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
**Version History**
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
20140120 Added snmp authentication
**Compatibility with StorCenter models**
px4-300r: All checks work
ix2/ix2-200: disk, raid, info checks work
Please note that newer firmware versions have a different OID which seems to break the plugin's checks. If anyone has information when (which firmware version) the OID change occured, please let me know.
**Requirements**
1) 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, although the password won't be needed.
2) The following commands must exist and be executable by your nagios user on your Nagios server:
snmpwalk, tr
**Usage**
./check_storcenter -H host -U user -t type [-w warning] [-c critical]
**Parameters**
-H Hostname or IP address of StorCenter NAS
-U Username 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
**Check Types**
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"
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
20140120 Added snmp authentication
**Compatibility with StorCenter models**
px4-300r: All checks work
ix2/ix2-200: disk, raid, info checks work
Please note that newer firmware versions have a different OID which seems to break the plugin's checks. If anyone has information when (which firmware version) the OID change occured, please let me know.
**Requirements**
1) 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, although the password won't be needed.
2) The following commands must exist and be executable by your nagios user on your Nagios server:
snmpwalk, tr
**Usage**
./check_storcenter -H host -U user -t type [-w warning] [-c critical]
**Parameters**
-H Hostname or IP address of StorCenter NAS
-U Username 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
**Check Types**
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"
Reviews (11)
byChristoff, August 29, 2016
Hello,
Very good job with this plugin !
We got 2 Iomega NAS :
1 ix2
1 ix2-200
Two checks have OID problems :
With the ix2, the info check returns " "ix2" (No Such Object available on this agent at this OID), Uptime: 113969624 (13 days) "
and the RAID check returns " RAID OK (Raid No Such Object available on this agent at this OID) "
My Firmware version is 4.1.212.33882
Best Regards,
Christoff
Very good job with this plugin !
We got 2 Iomega NAS :
1 ix2
1 ix2-200
Two checks have OID problems :
With the ix2, the info check returns " "ix2" (No Such Object available on this agent at this OID), Uptime: 113969624 (13 days) "
and the RAID check returns " RAID OK (Raid No Such Object available on this agent at this OID) "
My Firmware version is 4.1.212.33882
Best Regards,
Christoff
byiveltmann, February 5, 2015
sorry Claudio for polluting your Reviews but i didn't find any other way to contact bigchief because i got an ix4-300d and i would love to see his fork published so i can Monitor it.
besides that: thanks for YOUR work which as i understand was the base for his ;)
besides that: thanks for YOUR work which as i understand was the base for his ;)
byaribandus81, February 2, 2015
Hi,
I modified some OID for best compatibility with EMC LENOVO StorCenter version.
Hope it helps!
**********************************************
#!/bin/bash
#################################################################################
# Script: check_storcenter #
# Author: Claudio Kuenzler www.claudiokuenzler.com #
# Description: Plugin for Nagios (and forks) to check an EMC/Iomega #
# Storcenter device with SNMP (v3). #
# License: GPLv2 #
# History: #
# 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 missing #
# 20111031 Using vqeU in mem type (if response comes with kB string) #
# 20120425 Add port as variable #
#################################################################################
# Usage: ./check_storcenter -H host -P port -U user -t type [-w warning] [-c critical]
#################################################################################
help="check_storcenter (c) 2011 Claudio Kuenzler published under GPL license
\nUsage: ./check_storcenterv2 -H host -P port -U user -p password -t type [-w warning] [-c critical]
\nRequirements: snmpwalk, tr\n
\nOptions: \t-H hostname\n\t\t-U user (to be defined in snmp settings on Storcenter)\n\t\t-t Type to check, see list below
\t\t-P snmp port\n
\t\t-w Warning Threshold (optional)\n\t\t-c Critical Threshold (optional)\n
\nTypes: \t\tdisk -> Checks hard disks for their current status
\t\traid -> Checks the RAID status
\t\tcpu -> Check current CPU load (thresholds possible)
\t\thrProcessorLoad -> Check current CPU Load with OID = hrProcessorLoad
\t\tmem -> Check current memory (RAM) utilization (thresholds possible)
\t\tinfo -> Outputs some general information of the device"
# Nagios exit codes and PATH
STATE_OK=0 # define the exit code if status is OK
STATE_WARNING=1 # define the exit code if status is Warning
STATE_CRITICAL=2 # define the exit code if status is Critical
STATE_UNKNOWN=3 # define the exit code if status is Unknown
PATH=$PATH:/usr/local/bin:/usr/bin:/bin # Set path
# If the following programs aren't found, we don't launch the plugin
for cmd in snmpwalk tr [
do
if ! `which ${cmd} 1>/dev/null`
then
echo "UNKNOWN: ${cmd} does not exist, please check if command exists and PATH is correct"
exit ${STATE_UNKNOWN}
fi
done
#################################################################################
# Check for people who need help - aren't we all nice ;-)
if [ "${1}" = "--help" -o "${#}" = "0" ];
then
echo -e "${help}";
exit 1;
fi
#################################################################################
# Get user-given variables
while getopts "H:U:p:P:t:w:c:" Input;
do
case ${Input} in
H) host=${OPTARG};;
P) port=${OPTARG};;
U) user=${OPTARG};;
p) password=${OPTARG};;
t) type=${OPTARG};;
w) warning=${OPTARG};;
c) critical=${OPTARG};;
*) echo "Wrong option given. Please use options -H for host, -U for SNMP-User, -p for SNMP-Password, -P for port, -t for type, -w for warning and
-c for critical"
exit 1
;;
esac
done
#################################################################################
# Let's check that thing
case ${type} in
# Disk Check
disk) disknames=($(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${password} -O vqe ${host} ${port} .1.3.6.1.4.1.1139.10.4.3.1.2 | tr ' ' '-'))
countdisks=${#disknames[*]}
diskstatus=($(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${password} -O vqe ${host} ${port} .1.3.6.1.4.1.1139.10.4.3.1.4 | tr '"' ' '))
diskstatusok=0
diskstatusforeign=0
diskstatusfaulted=0
diskstatusmissing=0
disknumber=0
for status in ${diskstatus[@]}
do
if [ $status = "NORMAL" ]; then diskstatusok=$((diskstatusok + 1)); fi
if [ $status = "FOREIGN" ]; then diskstatusforeign=$((diskstatusforeign + 1)); diskproblem[${disknumber}]=${disknames[${disknumber}]}; fi
if [ $status = "FAULTED" ]; then diskstatusfaulted=$((diskstatusfaulted + 1)); diskproblem[${disknumber}]=${disknames[${disknumber}]}; fi
if [ $status = "MISSING" ]; then diskstatusmissing=$((diskstatusmissing + 1)); fi
let disknumber++
done
if [ $diskstatusforeign -gt 0 ] || [ $diskstatusfaulted -gt 0 ]
then echo "DISK CRITICAL - ${#diskproblem[@]} disk(s) failed (${diskproblem[@]})"; exit ${STATE_CRITICAL};
elif [ $diskstatusmissing -gt 0 ]
then echo "DISK OK - ${countdisks} disks found, ${diskstatusmissing} disks missing/empty"; exit ${STATE_OK}
else echo "DISK OK - ${countdisks} disks found, no problems"; exit ${STATE_OK}
fi
;;
# Raid Check
raid) raidstatus=$(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${password} -O vqe ${host} ${port} .1.3.6.1.4.1.11369.10.4.1.0 | tr '"' ' ')
raidtype=$(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${password} -O vqe ${host} ${port} .1.3.6.1.4.1.11369.10.4.2.0)
#echo ${raidstatus}
if [ $raidstatus = "REBUILDING" ] || [ $raidstatus = "DEGRADED" ] || [ $raidstatus = "REBUILDFS" ]
then echo "RAID WARNING - RAID$raidstatus"; exit ${STATE_WARNING}
elif [ $raidstatus = "FAULTED" ]
then echo "RAID CRITICAL - RAID$raidstatus"; exit ${STATE_CRITICAL}
else echo "RAID OK (Raid $raidtype)"; exit ${STATE_OK}
fi
;;
# CPU Load Old version with hrProcessorLoad
hrProcessorLoad) load=($(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${password} -O vqe ${host} ${port} hrProcessorLoad))
load1=${load[0]}
if [ -n "${warning}" ] || [ -n "${critical}" ]
then
if [ ${load1} -ge ${warning} ] && [ ${load1} -lt ${critical} ]
then echo "CPU USAGE WARNING - Current load is ${load1}|load=${load1}"; exit ${STATE_WARNING}
elif [ ${load1} -ge ${warning} ] && [ ${load1} -ge ${critical} ]
then echo "CPU USAGE CRITICAL - Current load is ${load1}|load1=$load1"; exit ${STATE_CRITICAL}
else echo "CPU USAGE OK - Current load is ${load1}|load1=${load1}"; exit ${STATE_OK}
fi
else echo "CPU LOAD OK - Current load is ${load1}|load1=${load1}"; exit ${STATE_OK}
fi
;;
# CPU Load
cpu) load=($(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${password} -O vqe ${host} ${port} .1.3.6.1.2.1.25.3.3.1.2.768))
load1=${load[0]}
load1int=$(echo $load1 | awk -F '.' '{print $1}')
load5=${load[1]}
load15=${load[2]}
if [ -n "${warning}" ] || [ -n "${critical}" ]
then
if [ ${load1int} -ge ${warning} ] && [ ${load1int} -lt ${critical} ]
then echo "CPU LOAD WARNING - Current load is ${load1}|load1=$load1;load5=$load5;load15=$load15"; exit ${STATE_WARNING}
elif [ ${load1int} -ge ${warning} ] && [ ${load1int} -ge ${critical} ]
then echo "CPU LOAD CRITICAL - Current load is ${load1}|load1=$load1;load5=$load5;load15=$load15"; exit ${STATE_CRITICAL}
else echo "CPU LOAD OK - Current load is ${load1}|load1=$load1;load5=$load5;load15=$load15"; exit ${STATE_OK}
fi
else echo "CPU LOAD OK - Current load is ${load1}|load1=$load1;load5=$load5;load15=$load15"; exit ${STATE_OK}
fi
;;
# Memory (RAM) usage
mem) memtotal=$(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${password} -O vqeU ${host} .1.3.6.1.2.1.25.2.3.1.5.1)
memused=$(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${password} -O vqeU ${host} .1.3.6.1.2.1.25.2.3.1.6.1)
memfree=$(( $memtotal - $memused))
memusedpercent=$(expr $memused \* 100 / $memtotal)
memtotalperf=$(expr $memtotal \* 1024)
memfreeperf=$(expr $memfree \* 1024)
memusedperf=$(expr $memused \* 1024)
if [ -n "${warning}" ] || [ -n "${critical}" ]
then
if [ ${memusedpercent} -ge ${warning} ] && [ ${memusedpercent} -lt ${critical} ]
then echo "MEMORY WARNING - Current memory usage is at $memusedpercent%|mem_total=$memtotalperf;mem_used=$memusedperf;mem_free=$memfreeperf"; exit
${STATE_WARNING}
elif [ ${memusedpercent} -ge ${warning} ] && [ ${memusedpercent} -ge ${critical} ]
then echo "MEMORY CRITICAL - Current memory usage is at $memusedpercent%|mem_total=$memtotalperf;mem_used=$memusedperf;mem_free=$memfreeperf"; exit
${STATE_CRITICAL}
else echo "MEMORY OK - Current memory usage is at $memusedpercent%|mem_total=$memtotalperf;mem_used=$memusedperf;mem_free=$memfreeperf"; exit
${STATE_OK}
fi
else echo "MEMORY OK - Current memory usage is at $memusedpercent%|mem_total=$memtotalperf;mem_used=$memusedperf;mem_free=$memfreeperf"; exit
${STATE_OK}
fi
;;
# General Information
info) uptime=$(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${password} -O vqt ${host} ${port} .1.3.6.1.2.1.25.1.1.0)
hostname=$(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${password} -O vqt ${host} ${port} .1.3.6.1.2.1.1.5.0)
description=$(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${password} -O vqt ${host} ${port} .1.3.6.1.4.1.11369.10.1.1.0)
uptimed=$(expr $uptime / 100 / 60 / 60 / 24)
echo "${hostname} (${description}), Uptime: ${uptime} ($uptimed days)"; exit ${STATE_OK}
;;
esac
echo "Unknown error"; exit ${STATE_UNKNOWN}
I modified some OID for best compatibility with EMC LENOVO StorCenter version.
Hope it helps!
**********************************************
#!/bin/bash
#################################################################################
# Script: check_storcenter #
# Author: Claudio Kuenzler www.claudiokuenzler.com #
# Description: Plugin for Nagios (and forks) to check an EMC/Iomega #
# Storcenter device with SNMP (v3). #
# License: GPLv2 #
# History: #
# 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 missing #
# 20111031 Using vqeU in mem type (if response comes with kB string) #
# 20120425 Add port as variable #
#################################################################################
# Usage: ./check_storcenter -H host -P port -U user -t type [-w warning] [-c critical]
#################################################################################
help="check_storcenter (c) 2011 Claudio Kuenzler published under GPL license
\nUsage: ./check_storcenterv2 -H host -P port -U user -p password -t type [-w warning] [-c critical]
\nRequirements: snmpwalk, tr\n
\nOptions: \t-H hostname\n\t\t-U user (to be defined in snmp settings on Storcenter)\n\t\t-t Type to check, see list below
\t\t-P snmp port\n
\t\t-w Warning Threshold (optional)\n\t\t-c Critical Threshold (optional)\n
\nTypes: \t\tdisk -> Checks hard disks for their current status
\t\traid -> Checks the RAID status
\t\tcpu -> Check current CPU load (thresholds possible)
\t\thrProcessorLoad -> Check current CPU Load with OID = hrProcessorLoad
\t\tmem -> Check current memory (RAM) utilization (thresholds possible)
\t\tinfo -> Outputs some general information of the device"
# Nagios exit codes and PATH
STATE_OK=0 # define the exit code if status is OK
STATE_WARNING=1 # define the exit code if status is Warning
STATE_CRITICAL=2 # define the exit code if status is Critical
STATE_UNKNOWN=3 # define the exit code if status is Unknown
PATH=$PATH:/usr/local/bin:/usr/bin:/bin # Set path
# If the following programs aren't found, we don't launch the plugin
for cmd in snmpwalk tr [
do
if ! `which ${cmd} 1>/dev/null`
then
echo "UNKNOWN: ${cmd} does not exist, please check if command exists and PATH is correct"
exit ${STATE_UNKNOWN}
fi
done
#################################################################################
# Check for people who need help - aren't we all nice ;-)
if [ "${1}" = "--help" -o "${#}" = "0" ];
then
echo -e "${help}";
exit 1;
fi
#################################################################################
# Get user-given variables
while getopts "H:U:p:P:t:w:c:" Input;
do
case ${Input} in
H) host=${OPTARG};;
P) port=${OPTARG};;
U) user=${OPTARG};;
p) password=${OPTARG};;
t) type=${OPTARG};;
w) warning=${OPTARG};;
c) critical=${OPTARG};;
*) echo "Wrong option given. Please use options -H for host, -U for SNMP-User, -p for SNMP-Password, -P for port, -t for type, -w for warning and
-c for critical"
exit 1
;;
esac
done
#################################################################################
# Let's check that thing
case ${type} in
# Disk Check
disk) disknames=($(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${password} -O vqe ${host} ${port} .1.3.6.1.4.1.1139.10.4.3.1.2 | tr ' ' '-'))
countdisks=${#disknames[*]}
diskstatus=($(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${password} -O vqe ${host} ${port} .1.3.6.1.4.1.1139.10.4.3.1.4 | tr '"' ' '))
diskstatusok=0
diskstatusforeign=0
diskstatusfaulted=0
diskstatusmissing=0
disknumber=0
for status in ${diskstatus[@]}
do
if [ $status = "NORMAL" ]; then diskstatusok=$((diskstatusok + 1)); fi
if [ $status = "FOREIGN" ]; then diskstatusforeign=$((diskstatusforeign + 1)); diskproblem[${disknumber}]=${disknames[${disknumber}]}; fi
if [ $status = "FAULTED" ]; then diskstatusfaulted=$((diskstatusfaulted + 1)); diskproblem[${disknumber}]=${disknames[${disknumber}]}; fi
if [ $status = "MISSING" ]; then diskstatusmissing=$((diskstatusmissing + 1)); fi
let disknumber++
done
if [ $diskstatusforeign -gt 0 ] || [ $diskstatusfaulted -gt 0 ]
then echo "DISK CRITICAL - ${#diskproblem[@]} disk(s) failed (${diskproblem[@]})"; exit ${STATE_CRITICAL};
elif [ $diskstatusmissing -gt 0 ]
then echo "DISK OK - ${countdisks} disks found, ${diskstatusmissing} disks missing/empty"; exit ${STATE_OK}
else echo "DISK OK - ${countdisks} disks found, no problems"; exit ${STATE_OK}
fi
;;
# Raid Check
raid) raidstatus=$(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${password} -O vqe ${host} ${port} .1.3.6.1.4.1.11369.10.4.1.0 | tr '"' ' ')
raidtype=$(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${password} -O vqe ${host} ${port} .1.3.6.1.4.1.11369.10.4.2.0)
#echo ${raidstatus}
if [ $raidstatus = "REBUILDING" ] || [ $raidstatus = "DEGRADED" ] || [ $raidstatus = "REBUILDFS" ]
then echo "RAID WARNING - RAID$raidstatus"; exit ${STATE_WARNING}
elif [ $raidstatus = "FAULTED" ]
then echo "RAID CRITICAL - RAID$raidstatus"; exit ${STATE_CRITICAL}
else echo "RAID OK (Raid $raidtype)"; exit ${STATE_OK}
fi
;;
# CPU Load Old version with hrProcessorLoad
hrProcessorLoad) load=($(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${password} -O vqe ${host} ${port} hrProcessorLoad))
load1=${load[0]}
if [ -n "${warning}" ] || [ -n "${critical}" ]
then
if [ ${load1} -ge ${warning} ] && [ ${load1} -lt ${critical} ]
then echo "CPU USAGE WARNING - Current load is ${load1}|load=${load1}"; exit ${STATE_WARNING}
elif [ ${load1} -ge ${warning} ] && [ ${load1} -ge ${critical} ]
then echo "CPU USAGE CRITICAL - Current load is ${load1}|load1=$load1"; exit ${STATE_CRITICAL}
else echo "CPU USAGE OK - Current load is ${load1}|load1=${load1}"; exit ${STATE_OK}
fi
else echo "CPU LOAD OK - Current load is ${load1}|load1=${load1}"; exit ${STATE_OK}
fi
;;
# CPU Load
cpu) load=($(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${password} -O vqe ${host} ${port} .1.3.6.1.2.1.25.3.3.1.2.768))
load1=${load[0]}
load1int=$(echo $load1 | awk -F '.' '{print $1}')
load5=${load[1]}
load15=${load[2]}
if [ -n "${warning}" ] || [ -n "${critical}" ]
then
if [ ${load1int} -ge ${warning} ] && [ ${load1int} -lt ${critical} ]
then echo "CPU LOAD WARNING - Current load is ${load1}|load1=$load1;load5=$load5;load15=$load15"; exit ${STATE_WARNING}
elif [ ${load1int} -ge ${warning} ] && [ ${load1int} -ge ${critical} ]
then echo "CPU LOAD CRITICAL - Current load is ${load1}|load1=$load1;load5=$load5;load15=$load15"; exit ${STATE_CRITICAL}
else echo "CPU LOAD OK - Current load is ${load1}|load1=$load1;load5=$load5;load15=$load15"; exit ${STATE_OK}
fi
else echo "CPU LOAD OK - Current load is ${load1}|load1=$load1;load5=$load5;load15=$load15"; exit ${STATE_OK}
fi
;;
# Memory (RAM) usage
mem) memtotal=$(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${password} -O vqeU ${host} .1.3.6.1.2.1.25.2.3.1.5.1)
memused=$(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${password} -O vqeU ${host} .1.3.6.1.2.1.25.2.3.1.6.1)
memfree=$(( $memtotal - $memused))
memusedpercent=$(expr $memused \* 100 / $memtotal)
memtotalperf=$(expr $memtotal \* 1024)
memfreeperf=$(expr $memfree \* 1024)
memusedperf=$(expr $memused \* 1024)
if [ -n "${warning}" ] || [ -n "${critical}" ]
then
if [ ${memusedpercent} -ge ${warning} ] && [ ${memusedpercent} -lt ${critical} ]
then echo "MEMORY WARNING - Current memory usage is at $memusedpercent%|mem_total=$memtotalperf;mem_used=$memusedperf;mem_free=$memfreeperf"; exit
${STATE_WARNING}
elif [ ${memusedpercent} -ge ${warning} ] && [ ${memusedpercent} -ge ${critical} ]
then echo "MEMORY CRITICAL - Current memory usage is at $memusedpercent%|mem_total=$memtotalperf;mem_used=$memusedperf;mem_free=$memfreeperf"; exit
${STATE_CRITICAL}
else echo "MEMORY OK - Current memory usage is at $memusedpercent%|mem_total=$memtotalperf;mem_used=$memusedperf;mem_free=$memfreeperf"; exit
${STATE_OK}
fi
else echo "MEMORY OK - Current memory usage is at $memusedpercent%|mem_total=$memtotalperf;mem_used=$memusedperf;mem_free=$memfreeperf"; exit
${STATE_OK}
fi
;;
# General Information
info) uptime=$(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${password} -O vqt ${host} ${port} .1.3.6.1.2.1.25.1.1.0)
hostname=$(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${password} -O vqt ${host} ${port} .1.3.6.1.2.1.1.5.0)
description=$(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${password} -O vqt ${host} ${port} .1.3.6.1.4.1.11369.10.1.1.0)
uptimed=$(expr $uptime / 100 / 60 / 60 / 24)
echo "${hostname} (${description}), Uptime: ${uptime} ($uptimed days)"; exit ${STATE_OK}
;;
esac
echo "Unknown error"; exit ${STATE_UNKNOWN}
byrtrevino70, January 31, 2015
Thanks to the OP for it, but now I have upgraded to the new lenovos and some features just don't work
bybigchief, December 10, 2014
2 of 2 people found this review helpful
Hi,
just did a complete renew of the initial check_storcenter script:
-Made it compatible with the newest Lenovo Firmware.
-Exchanged Numeric SNMP with the humanreadable MIB
-Added extra feature to monitor Storage Box health, too
The new version is compatible with the ix4-300d Box. Other Versions may work, too. Try it out and report your experience.
Contact me if you are interested in the new version. Maybee i will put it then online.
Best Regards
B!
just did a complete renew of the initial check_storcenter script:
-Made it compatible with the newest Lenovo Firmware.
-Exchanged Numeric SNMP with the humanreadable MIB
-Added extra feature to monitor Storage Box health, too
The new version is compatible with the ix4-300d Box. Other Versions may work, too. Try it out and report your experience.
Contact me if you are interested in the new version. Maybee i will put it then online.
Best Regards
B!
bySimpatia, September 3, 2014
Hi Napsty, on my ix12-300r OID changed to SNMPv2-SMI::enterprises.11369.10.4.1.0 (Raid Status) and SNMPv2-SMI::enterprises.11369.10.4.2.0 (Raid Type) after a firmware update.
Thanks for your helpful plugin!
Bye, Giuseppe
Thanks for your helpful plugin!
Bye, Giuseppe
bydonjoze136, August 15, 2014
Hello
I propose a new version of this plugin to work with new version of OS (Lenovo :
Nota: cpu don't work with new version of Lenovo OS. Use HrProcessorLoad instead
#!/bin/bash
#################################################################################
# Script: check_storcenter #
# Author: Claudio Kuenzler www.claudiokuenzler.com #
# Description: Plugin for Nagios (and forks) to check an EMC/Iomega #
# Storcenter device with SNMP (v3). #
# License: GPLv2 #
# History: #
# 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 missing #
# 20111031 Using vqeU in mem type (if response comes with kB string) #
# 20120425 Add port as variable #
#################################################################################
# Usage: ./check_storcenter -H host -P port -U user -t type [-w warning] [-c critical]
#################################################################################
help="check_storcenter (c) 2011 Claudio Kuenzler published under GPL license
\nUsage: ./check_storcenterv2 -H host -P port -U user -t type [-w warning] [-c critical]
\nRequirements: snmpwalk, tr\n
\nOptions: \t-H hostname\n\t\t-U user (to be defined in snmp settings on Storcenter)\n\t\t-t Type to check, see list below
\t\t-P snmp port\n
\t\t-w Warning Threshold (optional)\n\t\t-c Critical Threshold (optional)\n
\nTypes: \t\tdisk -> Checks hard disks for their current status
\t\traid -> Checks the RAID status
\t\tcpu -> Check current CPU load (thresholds possible)
\t\thrProcessorLoad -> Check current CPU Load with OID = hrProcessorLoad
\t\tmem -> Check current memory (RAM) utilization (thresholds possible)
\t\tinfo -> Outputs some general information of the device"
# Nagios exit codes and PATH
STATE_OK=0 # define the exit code if status is OK
STATE_WARNING=1 # define the exit code if status is Warning
STATE_CRITICAL=2 # define the exit code if status is Critical
STATE_UNKNOWN=3 # define the exit code if status is Unknown
PATH=$PATH:/usr/local/bin:/usr/bin:/bin # Set path
# If the following programs aren't found, we don't launch the plugin
for cmd in snmpwalk tr [
do
if ! `which ${cmd} 1>/dev/null`
then
echo "UNKNOWN: ${cmd} does not exist, please check if command exists and PATH is correct"
exit ${STATE_UNKNOWN}
fi
done
#################################################################################
# Check for people who need help - aren't we all nice ;-)
if [ "${1}" = "--help" -o "${#}" = "0" ];
then
echo -e "${help}";
exit 1;
fi
#################################################################################
# Get user-given variables
while getopts "H:U:P:t:w:c:" Input;
do
case ${Input} in
H) host=${OPTARG};;
P) port=${OPTARG};;
U) user=${OPTARG};;
t) type=${OPTARG};;
w) warning=${OPTARG};;
c) critical=${OPTARG};;
*) echo "Wrong option given. Please use options -H for host, -U for SNMP-User, -P for port, -t for type, -w for warning and -c for critical"
exit 1
;;
esac
done
#################################################################################
# Let's check that thing
case ${type} in
# Disk Check
disk) disknames=($(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${user} -O vqe ${host}${port} .1.3.6.1.4.1.1139.10.4.3.1.2 | tr ' ' '-'))
countdisks=${#disknames[*]}
diskstatus=($(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${user} -O vqe ${host}${port} .1.3.6.1.4.1.1139.10.4.3.1.4 | tr '"' ' '))
diskstatusok=0
diskstatusforeign=0
diskstatusfaulted=0
diskstatusmissing=0
disknumber=0
for status in ${diskstatus[@]}
do
if [ $status = "NORMAL" ]; then diskstatusok=$((diskstatusok + 1)); fi
if [ $status = "FOREIGN" ]; then diskstatusforeign=$((diskstatusforeign + 1)); diskproblem[${disknumber}]=${disknames[${disknumber}]}; fi
if [ $status = "FAULTED" ]; then diskstatusfaulted=$((diskstatusfaulted + 1)); diskproblem[${disknumber}]=${disknames[${disknumber}]}; fi
if [ $status = "MISSING" ]; then diskstatusmissing=$((diskstatusmissing + 1)); fi
let disknumber++
done
if [ $diskstatusforeign -gt 0 ] || [ $diskstatusfaulted -gt 0 ]
then echo "DISK CRITICAL - ${#diskproblem[@]} disk(s) failed (${diskproblem[@]})"; exit ${STATE_CRITICAL};
elif [ $diskstatusmissing -gt 0 ]
then echo "DISK OK - ${countdisks} disks found, ${diskstatusmissing} disks missing/empty"; exit ${STATE_OK}
else echo "DISK OK - ${countdisks} disks found, no problems"; exit ${STATE_OK}
fi
;;
# Raid Check
raid) raidstatus=$(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${user} -O vqe ${host}${port} .1.3.6.1.4.1.1139.10.4.1.0 | tr '"' ' ')
raidtype=$(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${user} -O vqe ${host}${port} .1.3.6.1.4.1.1139.10.4.2.0)
#echo ${raidstatus}
if [ $raidstatus = "REBUILDING" ] || [ $raidstatus = "DEGRADED" ] || [ $raidstatus = "REBUILDFS" ]
then echo "RAID WARNING - RAID$raidstatus"; exit ${STATE_WARNING}
elif [ $raidstatus = "FAULTED" ]
then echo "RAID CRITICAL - RAID$raidstatus"; exit ${STATE_CRITICAL}
else echo "RAID OK (Raid $raidtype)"; exit ${STATE_OK}
fi
;;
# CPU Load Old version with hrProcessorLoad
hrProcessorLoad) load=($(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${user} -O vqe ${host}${port} hrProcessorLoad))
load1=${load[0]}
if [ -n "${warning}" ] || [ -n "${critical}" ]
then
if [ ${load1} -ge ${warning} ] && [ ${load1} -lt ${critical} ]
then echo "CPU USAGE WARNING - Current load is ${load1}|load=${load1}"; exit ${STATE_WARNING}
elif [ ${load1} -ge ${warning} ] && [ ${load1} -ge ${critical} ]
then echo "CPU USAGE CRITICAL - Current load is ${load1}|load1=$load1"; exit ${STATE_CRITICAL}
else echo "CPU USAGE OK - Current load is ${load1}|load1=${load1}"; exit ${STATE_OK}
fi
else echo "CPU LOAD OK - Current load is ${load1}|load1=${load1}"; exit ${STATE_OK}
fi
;;
# CPU Load
cpu) load=($(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${user} -O vqe ${host}${port} .1.3.6.1.4.1.2021.10.1.3))
load1=${load[0]}
load1int=$(echo $load1 | awk -F '.' '{print $1}')
load5=${load[1]}
load15=${load[2]}
if [ -n "${warning}" ] || [ -n "${critical}" ]
then
if [ ${load1int} -ge ${warning} ] && [ ${load1int} -lt ${critical} ]
then echo "CPU LOAD WARNING - Current load is ${load1}|load1=$load1;load5=$load5;load15=$load15"; exit ${STATE_WARNING}
elif [ ${load1int} -ge ${warning} ] && [ ${load1int} -ge ${critical} ]
then echo "CPU LOAD CRITICAL - Current load is ${load1}|load1=$load1;load5=$load5;load15=$load15"; exit ${STATE_CRITICAL}
else echo "CPU LOAD OK - Current load is ${load1}|load1=$load1;load5=$load5;load15=$load15"; exit ${STATE_OK}
fi
else echo "CPU LOAD OK - Current load is ${load1}|load1=$load1;load5=$load5;load15=$load15"; exit ${STATE_OK}
fi
;;
# Memory (RAM) usage
mem) memtotal=$(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${user} -O vqeU ${host}${port} .1.3.6.1.4.1.2021.4.5.0)
memfree=$(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${user} -O vqeU ${host}${port} .1.3.6.1.4.1.2021.4.6.0)
memused=$(( $memtotal - $memfree))
memusedpercent=$(expr $memused \* 100 / $memtotal)
memtotalperf=$(expr $memtotal \* 1024)
memfreeperf=$(expr $memfree \* 1024)
memusedperf=$(expr $memused \* 1024)
if [ -n "${warning}" ] || [ -n "${critical}" ]
then
if [ ${memusedpercent} -ge ${warning} ] && [ ${memusedpercent} -lt ${critical} ]
then echo "MEMORY WARNING - Current memory usage is at $memusedpercent%|mem_total=$memtotalperf;mem_used=$memusedperf;mem_free=$memfreeperf"; exit ${STATE_WARNING}
elif [ ${memusedpercent} -ge ${warning} ] && [ ${memusedpercent} -ge ${critical} ]
then echo "MEMORY CRITICAL - Current memory usage is at $memusedpercent%|mem_total=$memtotalperf;mem_used=$memusedperf;mem_free=$memfreeperf"; exit ${STATE_CRITICAL}
else echo "MEMORY OK - Current memory usage is at $memusedpercent%|mem_total=$memtotalperf;mem_used=$memusedperf;mem_free=$memfreeperf"; exit ${STATE_OK}
fi
else echo "MEMORY OK - Current memory usage is at $memusedpercent%|mem_total=$memtotalperf;mem_used=$memusedperf;mem_free=$memfreeperf"; exit ${STATE_OK}
fi
;;
# General Information
info) uptime=$(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${user} -O vqt ${host}${port} .1.3.6.1.2.1.25.1.1.0)
hostname=$(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${user} -O vqt ${host}${port} .1.3.6.1.2.1.1.5.0)
description=$(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${user} -O vqt ${host}${port} .1.3.6.1.4.1.1139.10.1.1.0)
uptimed=$(expr $uptime / 100 / 60 / 60 / 24)
echo "${hostname} (${description}), Uptime: ${uptime} ($uptimed days)"; exit ${STATE_OK}
;;
esac
echo "Unknown error"; exit ${STATE_UNKNOWN}
I propose a new version of this plugin to work with new version of OS (Lenovo :
Nota: cpu don't work with new version of Lenovo OS. Use HrProcessorLoad instead
#!/bin/bash
#################################################################################
# Script: check_storcenter #
# Author: Claudio Kuenzler www.claudiokuenzler.com #
# Description: Plugin for Nagios (and forks) to check an EMC/Iomega #
# Storcenter device with SNMP (v3). #
# License: GPLv2 #
# History: #
# 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 missing #
# 20111031 Using vqeU in mem type (if response comes with kB string) #
# 20120425 Add port as variable #
#################################################################################
# Usage: ./check_storcenter -H host -P port -U user -t type [-w warning] [-c critical]
#################################################################################
help="check_storcenter (c) 2011 Claudio Kuenzler published under GPL license
\nUsage: ./check_storcenterv2 -H host -P port -U user -t type [-w warning] [-c critical]
\nRequirements: snmpwalk, tr\n
\nOptions: \t-H hostname\n\t\t-U user (to be defined in snmp settings on Storcenter)\n\t\t-t Type to check, see list below
\t\t-P snmp port\n
\t\t-w Warning Threshold (optional)\n\t\t-c Critical Threshold (optional)\n
\nTypes: \t\tdisk -> Checks hard disks for their current status
\t\traid -> Checks the RAID status
\t\tcpu -> Check current CPU load (thresholds possible)
\t\thrProcessorLoad -> Check current CPU Load with OID = hrProcessorLoad
\t\tmem -> Check current memory (RAM) utilization (thresholds possible)
\t\tinfo -> Outputs some general information of the device"
# Nagios exit codes and PATH
STATE_OK=0 # define the exit code if status is OK
STATE_WARNING=1 # define the exit code if status is Warning
STATE_CRITICAL=2 # define the exit code if status is Critical
STATE_UNKNOWN=3 # define the exit code if status is Unknown
PATH=$PATH:/usr/local/bin:/usr/bin:/bin # Set path
# If the following programs aren't found, we don't launch the plugin
for cmd in snmpwalk tr [
do
if ! `which ${cmd} 1>/dev/null`
then
echo "UNKNOWN: ${cmd} does not exist, please check if command exists and PATH is correct"
exit ${STATE_UNKNOWN}
fi
done
#################################################################################
# Check for people who need help - aren't we all nice ;-)
if [ "${1}" = "--help" -o "${#}" = "0" ];
then
echo -e "${help}";
exit 1;
fi
#################################################################################
# Get user-given variables
while getopts "H:U:P:t:w:c:" Input;
do
case ${Input} in
H) host=${OPTARG};;
P) port=${OPTARG};;
U) user=${OPTARG};;
t) type=${OPTARG};;
w) warning=${OPTARG};;
c) critical=${OPTARG};;
*) echo "Wrong option given. Please use options -H for host, -U for SNMP-User, -P for port, -t for type, -w for warning and -c for critical"
exit 1
;;
esac
done
#################################################################################
# Let's check that thing
case ${type} in
# Disk Check
disk) disknames=($(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${user} -O vqe ${host}${port} .1.3.6.1.4.1.1139.10.4.3.1.2 | tr ' ' '-'))
countdisks=${#disknames[*]}
diskstatus=($(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${user} -O vqe ${host}${port} .1.3.6.1.4.1.1139.10.4.3.1.4 | tr '"' ' '))
diskstatusok=0
diskstatusforeign=0
diskstatusfaulted=0
diskstatusmissing=0
disknumber=0
for status in ${diskstatus[@]}
do
if [ $status = "NORMAL" ]; then diskstatusok=$((diskstatusok + 1)); fi
if [ $status = "FOREIGN" ]; then diskstatusforeign=$((diskstatusforeign + 1)); diskproblem[${disknumber}]=${disknames[${disknumber}]}; fi
if [ $status = "FAULTED" ]; then diskstatusfaulted=$((diskstatusfaulted + 1)); diskproblem[${disknumber}]=${disknames[${disknumber}]}; fi
if [ $status = "MISSING" ]; then diskstatusmissing=$((diskstatusmissing + 1)); fi
let disknumber++
done
if [ $diskstatusforeign -gt 0 ] || [ $diskstatusfaulted -gt 0 ]
then echo "DISK CRITICAL - ${#diskproblem[@]} disk(s) failed (${diskproblem[@]})"; exit ${STATE_CRITICAL};
elif [ $diskstatusmissing -gt 0 ]
then echo "DISK OK - ${countdisks} disks found, ${diskstatusmissing} disks missing/empty"; exit ${STATE_OK}
else echo "DISK OK - ${countdisks} disks found, no problems"; exit ${STATE_OK}
fi
;;
# Raid Check
raid) raidstatus=$(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${user} -O vqe ${host}${port} .1.3.6.1.4.1.1139.10.4.1.0 | tr '"' ' ')
raidtype=$(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${user} -O vqe ${host}${port} .1.3.6.1.4.1.1139.10.4.2.0)
#echo ${raidstatus}
if [ $raidstatus = "REBUILDING" ] || [ $raidstatus = "DEGRADED" ] || [ $raidstatus = "REBUILDFS" ]
then echo "RAID WARNING - RAID$raidstatus"; exit ${STATE_WARNING}
elif [ $raidstatus = "FAULTED" ]
then echo "RAID CRITICAL - RAID$raidstatus"; exit ${STATE_CRITICAL}
else echo "RAID OK (Raid $raidtype)"; exit ${STATE_OK}
fi
;;
# CPU Load Old version with hrProcessorLoad
hrProcessorLoad) load=($(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${user} -O vqe ${host}${port} hrProcessorLoad))
load1=${load[0]}
if [ -n "${warning}" ] || [ -n "${critical}" ]
then
if [ ${load1} -ge ${warning} ] && [ ${load1} -lt ${critical} ]
then echo "CPU USAGE WARNING - Current load is ${load1}|load=${load1}"; exit ${STATE_WARNING}
elif [ ${load1} -ge ${warning} ] && [ ${load1} -ge ${critical} ]
then echo "CPU USAGE CRITICAL - Current load is ${load1}|load1=$load1"; exit ${STATE_CRITICAL}
else echo "CPU USAGE OK - Current load is ${load1}|load1=${load1}"; exit ${STATE_OK}
fi
else echo "CPU LOAD OK - Current load is ${load1}|load1=${load1}"; exit ${STATE_OK}
fi
;;
# CPU Load
cpu) load=($(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${user} -O vqe ${host}${port} .1.3.6.1.4.1.2021.10.1.3))
load1=${load[0]}
load1int=$(echo $load1 | awk -F '.' '{print $1}')
load5=${load[1]}
load15=${load[2]}
if [ -n "${warning}" ] || [ -n "${critical}" ]
then
if [ ${load1int} -ge ${warning} ] && [ ${load1int} -lt ${critical} ]
then echo "CPU LOAD WARNING - Current load is ${load1}|load1=$load1;load5=$load5;load15=$load15"; exit ${STATE_WARNING}
elif [ ${load1int} -ge ${warning} ] && [ ${load1int} -ge ${critical} ]
then echo "CPU LOAD CRITICAL - Current load is ${load1}|load1=$load1;load5=$load5;load15=$load15"; exit ${STATE_CRITICAL}
else echo "CPU LOAD OK - Current load is ${load1}|load1=$load1;load5=$load5;load15=$load15"; exit ${STATE_OK}
fi
else echo "CPU LOAD OK - Current load is ${load1}|load1=$load1;load5=$load5;load15=$load15"; exit ${STATE_OK}
fi
;;
# Memory (RAM) usage
mem) memtotal=$(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${user} -O vqeU ${host}${port} .1.3.6.1.4.1.2021.4.5.0)
memfree=$(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${user} -O vqeU ${host}${port} .1.3.6.1.4.1.2021.4.6.0)
memused=$(( $memtotal - $memfree))
memusedpercent=$(expr $memused \* 100 / $memtotal)
memtotalperf=$(expr $memtotal \* 1024)
memfreeperf=$(expr $memfree \* 1024)
memusedperf=$(expr $memused \* 1024)
if [ -n "${warning}" ] || [ -n "${critical}" ]
then
if [ ${memusedpercent} -ge ${warning} ] && [ ${memusedpercent} -lt ${critical} ]
then echo "MEMORY WARNING - Current memory usage is at $memusedpercent%|mem_total=$memtotalperf;mem_used=$memusedperf;mem_free=$memfreeperf"; exit ${STATE_WARNING}
elif [ ${memusedpercent} -ge ${warning} ] && [ ${memusedpercent} -ge ${critical} ]
then echo "MEMORY CRITICAL - Current memory usage is at $memusedpercent%|mem_total=$memtotalperf;mem_used=$memusedperf;mem_free=$memfreeperf"; exit ${STATE_CRITICAL}
else echo "MEMORY OK - Current memory usage is at $memusedpercent%|mem_total=$memtotalperf;mem_used=$memusedperf;mem_free=$memfreeperf"; exit ${STATE_OK}
fi
else echo "MEMORY OK - Current memory usage is at $memusedpercent%|mem_total=$memtotalperf;mem_used=$memusedperf;mem_free=$memfreeperf"; exit ${STATE_OK}
fi
;;
# General Information
info) uptime=$(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${user} -O vqt ${host}${port} .1.3.6.1.2.1.25.1.1.0)
hostname=$(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${user} -O vqt ${host}${port} .1.3.6.1.2.1.1.5.0)
description=$(snmpwalk -v 3 -u ${user} -l authNoPriv -a MD5 -A ${user} -O vqt ${host}${port} .1.3.6.1.4.1.1139.10.1.1.0)
uptimed=$(expr $uptime / 100 / 60 / 60 / 24)
echo "${hostname} (${description}), Uptime: ${uptime} ($uptimed days)"; exit ${STATE_OK}
;;
esac
echo "Unknown error"; exit ${STATE_UNKNOWN}
bydcarro, November 28, 2013
Hi,
I change OID for CPU in script.
Old line :
load=($(snmpwalk -v 3 -u ${user} -O vqe ${host} .1.3.6.1.4.1.2021.10.1.3))
Output with old line :
CPU LOAD OK - Current load is No|load1=No;load5=Such;load15=Object
New :
load=($(snmpwalk -v 3 -u ${user} -O vqe ${host} .1.3.6.1.2.1.25.3.3.1.2.768))
Output with new line :
CPU LOAD OK - Current load is 100|load1=100;load5=;load15=
I hope this will help someone
Tested with StorCenter ix2-200 v. 2.1.42.18967
Good job to developper
Sorry for my english.
I change OID for CPU in script.
Old line :
load=($(snmpwalk -v 3 -u ${user} -O vqe ${host} .1.3.6.1.4.1.2021.10.1.3))
Output with old line :
CPU LOAD OK - Current load is No|load1=No;load5=Such;load15=Object
New :
load=($(snmpwalk -v 3 -u ${user} -O vqe ${host} .1.3.6.1.2.1.25.3.3.1.2.768))
Output with new line :
CPU LOAD OK - Current load is 100|load1=100;load5=;load15=
I hope this will help someone
Tested with StorCenter ix2-200 v. 2.1.42.18967
Good job to developper
Sorry for my english.
Hi! I tested on my ix2-200 at office and the memory error ocurrs.
After i checked OIDs from the memory check, i found differences, changin and now it's working fine now.
I modified the code, excanging memfree and memused and collected different OID
memtotal: .1.3.6.1.2.1.25.2.3.1.5.1
memused : .1.3.6.1.2.1.25.2.3.1.6.1
Old code:
mem) memtotal=$(snmpwalk -v 3 -u ${user} -O vqeU ${host} .1.3.6.1.4.1.2021.4.5.0)
memfree=$(snmpwalk -v 3 -u ${user} -O vqeU ${host} .1.3.6.1.4.1.2021.4.11.0)
memused=$(( $memtotal - $memfree))
-
New code:
mem) memtotal=$(snmpwalk -v 3 -u ${user} -O vqeU ${host} .1.3.6.1.2.1.25.2.3.1.5.1)
memused=$(snmpwalk -v 3 -u ${user} -O vqeU ${host} .1.3.6.1.2.1.25.2.3.1.6.1)
memfree=$(( $memtotal - $memused))
Hope it helps you, and thanks for this nice plugin!
After i checked OIDs from the memory check, i found differences, changin and now it's working fine now.
I modified the code, excanging memfree and memused and collected different OID
memtotal: .1.3.6.1.2.1.25.2.3.1.5.1
memused : .1.3.6.1.2.1.25.2.3.1.6.1
Old code:
mem) memtotal=$(snmpwalk -v 3 -u ${user} -O vqeU ${host} .1.3.6.1.4.1.2021.4.5.0)
memfree=$(snmpwalk -v 3 -u ${user} -O vqeU ${host} .1.3.6.1.4.1.2021.4.11.0)
memused=$(( $memtotal - $memfree))
-
New code:
mem) memtotal=$(snmpwalk -v 3 -u ${user} -O vqeU ${host} .1.3.6.1.2.1.25.2.3.1.5.1)
memused=$(snmpwalk -v 3 -u ${user} -O vqeU ${host} .1.3.6.1.2.1.25.2.3.1.6.1)
memfree=$(( $memtotal - $memused))
Hope it helps you, and thanks for this nice plugin!
byrosivaldo, February 15, 2013
Hi! I also tested on ix4-200d and the memory error ocurrs.
But, I compared and changed the OID from the memory check, so it's working fine now. Here's the new one:
* Size: .1.3.6.1.2.1.25.2.3.1.5.1
* Used: .1.3.6.1.2.1.25.2.3.1.6.1
Although, by the MIB file that came with it, your values are supposed to work.
Hope it helps you, and thanks for this nice plugin!
But, I compared and changed the OID from the memory check, so it's working fine now. Here's the new one:
* Size: .1.3.6.1.2.1.25.2.3.1.5.1
* Used: .1.3.6.1.2.1.25.2.3.1.6.1
Although, by the MIB file that came with it, your values are supposed to work.
Hope it helps you, and thanks for this nice plugin!
Tested on Iomega StorCenter ix4-200d.
Working for Disk, Raid, Info and cpu
Error with mem :
./check_storcenter.pl: line 135: No Such Object available on this agent at this OID - No Such Object available on this agent at this OID: syntax error in expression (error token is "Such Object available on this agent at this OID - No Such Object available on this agent at this OID")
Unknown error
Any idea ?
Working for Disk, Raid, Info and cpu
Error with mem :
./check_storcenter.pl: line 135: No Such Object available on this agent at this OID - No Such Object available on this agent at this OID: syntax error in expression (error token is "Such Object available on this agent at this OID - No Such Object available on this agent at this OID")
Unknown error
Any idea ?
Owner's reply
It would be helpful to see the snmpwalk output on your ix4-200d. As I don't have such a model, I can't test the plugin on it. Please contact me on my site and we can try to make the plugin compatible.