@@ -0,0 +1,68919 @@
+-- *************************************************************************
+-- AMERICAN POWER CONVERSION PowerNet-MIB
+-- *************************************************************************
+-- Copyright (c) 2013 American Power Conversion, Inc.
+-- PowerNet is a Trademark of American Power Conversion Corp.
+--
+-- Title: APC TOP LEVEL PowerNet MIB
+--
+-- Version : 4.0.8
+--
+-- Generated by script: tomib.awk
+--
+-- Input File: powernetPS.mib
+--
+-- Created: Friday, March, 15, 2013
+--
+-- Revision History:
+-- *************************************************************************
+
+-- - v3.2.0 Added functionality for MasterSwitch Plus
+-- - v3.3.0 Added functionality for MX28B (dcDM3) and 3-phase UPS
+-- - v3.3.2 New traps for Symmetra PX UPS
+-- 07/15/01 - v3.4.0 Added transfer switch
+-- - v3.4.3 Added functionality for External and Integrated Environmental Monitor
+-- 06/14/02 - v3.4.4 Added dcmim2(Siemens) branch, Battery Manager(Reading) traps, and
+-- Psx Traps for PDU and RM-PDU and Netlock branch/traps
+-- 12/13/02 - v3.5.0 netlock - Initial support for netlock (nl). Traps 261-265 added.
+-- rPDU - Initial support for rPDU. Traps 266-283 added.
+-- rARU - Initial support for rARU.
+-- gateway - Initial support for gateway (gw). Traps 230-260, 284-297 added.
+-- ups - upsSyncCtrlGroup and upsState sections added.
+-- 02/19/03 - v3.6.0 ups - UpsOutletGroups section added. Traps 298-299 added.
+-- smw - Traps 300-305 added.
+-- rPDU - General OID description cleanups.
+-- gw - Updated SNMP support for gw.
+-- 05/21/03 - v3.6.1 ups - Updated SNMP support for ups.
+-- ems - Environmental Management System OIDs renamed from gateway (gw).
+-- raru - Updated SNMP support for raru.
+-- 06/13/03 - v3.6.3 airFM - Initial support for airFM. Traps 306-311 added.
+-- nl - Traps 261-265 removed.
+-- 11/26/03 - v3.6.4 xPDU - Initial support for xPDU. Traps 312-344 added.
+-- airPA - Initial support for airPA. Traps 306-311 modified for airPA use.
+-- airFM - AirFMStatus OIDs cleaned up.
+-- 03/19/04 - v3.6.5 rPDU - Updated SNMP support for rPDU.
+-- airFM - AirFMGroup section added.
+-- 05/13/04 - v3.6.6 ups - Added several upsAdvBattery OIDs.
+-- ems - Added emsStatusHardwareStatus and emsHardwareState traps 345-346.
+-- aru - Trap 228 redefined to aruDeviceConfigChange.
+-- 08/04/04 - v3.6.7 ups - Added upsAdvConfigNumExternalBatteries and
+-- upsAdvConfigSimpleSignalShutdowns.
+-- ce - Custom Event traps 347-352 added.
+-- 11/22/04 - v3.6.8 ems - Many emsProbeConfig and emsProbeStatus OIDs added.
+-- ups - Traps 353-358 added.
+-- env - Traps 359-374 added.
+-- 01/26/05 - v3.6.9 battman - Initial support for battman, traps 375-380 added.
+-- xATS - Initial support for xATS, traps 381-478 added.
+-- generator - Initial support for generator.
+-- rPDU - Trap edits.
+-- xPDU - Trap edits.
+-- 05/26/05 - v3.7.0 consolePortServer - Initial support for consolePortServer (cpsAP930x).
+-- xPDU - Cleaned up many descriptions.
+-- xATS - Cleaned up many descriptions.
+-- ups - Added several upsAdvConfig OIDs.
+-- 09/28/05 - v3.8.0 modEnvMgr - Initial support for modEnvMgr (mem).
+-- rARU - Added functionality for Gen 2 ARU.
+-- ups/aru/mem - Traps 500-569 added.
+-- all - General cleanup on typos and spelling errors.
+-- 01/04/06 - v3.8.1 rARU - Added functionality for Gen 2 ARU
+-- 02/22/06 - v3.8.2 accessControl - Initial support for accessControl.
+-- Traps 570-592 added.
+-- accessPX - Initial support for accessPX.
+-- airIR - Initial support for airIR and airIRAlarms.
+-- airIRRC - Initial support for airIRRC.
+-- 05/24/06 - v3.8.4 apcLocalDisplay - Initial support for apcLocalDisplay.
+-- ups - UpsAdvOutputRedundancy, upsAdvOutputKVACapacity,
+-- upsAdvConfigBasicSignalLowBatteryDuration, and
+-- upsAdvConfigBypassPhaseLockRequired OIDs added.
+-- UpsAdvConfigMinReturnRuntime SYNTAX changed.
+-- UPS trap numbers 600-623 added.
+-- em - New emConfigProbe, emConfigContact, emStatusProbe OIDs added.
+-- iem - New iemConfigProbe, iemConfigContact, iemStatusProbe OIDs added.
+-- 08/31/06 - v3.8.5 airIRSC - Initial support for airIRSC.
+-- XPDU - XPDUBranchBreaker OIDs and xPDUBranchCurrent traps added.
+-- 11/03/06 - v3.8.6 rPDU - Updated SNMP support for rPDU.
+-- accessPX - accessPXConfigCardFormat OID added.
+-- airIRSC - airIRSCUnitStatusCompressor added.
+-- 01/03/07 - v3.8.7 airIRRP - Initial support for airIRRP100 and airIRRP500.
+-- 04/06/07 - v3.8.8 battMan - Updated SNMP support for Battery Manager,
+-- battManConfigApplication OID deprecated.
+-- airIRRP - Added HeatAssistEnable to airIRRP100 and airIRRP500.
+-- ups - Added several upsDiagSubSys OIDs.
+-- iem - Added iemStatusProbeLocation OID.
+-- all - Cleaned up version history section.
+-- 12/19/07 - v3.9.1 airFM - Added full SNMP support, deprecating some existing OIDs in
+-- favor of new structure.
+-- 12/19/07 - v3.9.2 Added new OIDs for isxModularDistribution, isxModularPdu, airInRoomPerimeter
+-- airIRGen2, symmetraPX IDs, isxServers IDs, upsAdvConfig, upsDiagSubSysNetworkComCard,
+-- memInputsCommStatus, airIRRP100GroupSetpoints. Added new SNMP Traps for
+-- ISX Modular Distribution, and xATS.
+-- 08/13/08 - v3.9.3 Added new OIDs for UPS HighPrec OIDs:
+-- upsHighPrecBattery, upsHighPrecInput, and upsHighPrecOutput.
+-- Added new OIDs for the 10kW the AIR IR Gen2:
+-- airIRG2RDT2ConfigUnitRoleOverride, airIRG2RDT2RunHoursUnit,
+-- airIRG2GroupConfigNumberofBackupUnits, airIRG2GroupConfigRuntimeBalancingEnable,
+-- and airIRG2GroupConfigLoadAssistEnable for use by 10kW application.
+-- Added new traps apcInternalCommunicationFault and apcInternalCommunicationFaultCleared
+-- for use by the SUMX application.
+-- Updated descriptions in existing OIDs.
+-- 09/25/08 - v3.9.4 Added new OIDs for Symmetra PX:
+-- upsParallelSystem, upsPhysicalLayout, upsAdvConfigMainsSetting, upsAdvConfigACWiringSetting,
+-- upsAdvConfigUpperOutputVoltTolerance, upsAdvConfigLowerOutputVoltTolerance, upsAdvConfigUpperBypassVoltTolerance
+-- upsAdvConfigLowerBypassVoltTolerance, upsAdvConfigOutofSyncBypassTransferDelay, upsAdvTestDiagnosticTime
+-- upsAdvTestDiagnosticDay, upsDiagSwitchGearBypassInputSwitchStatus, upsDiagSubFeedBreakerTable,
+-- upsDiagSubFeedBreakerTable, upsSideCarFrameLayoutTable, upsPowerFrameLayoutTable
+-- Added new OIDs for UPSs:
+-- upsBasicSystemStatus, upsAdvControlFlashAndBeep (appended new list options)
+-- Added new OIDs for the AC RP10kW:
+-- airIRG2RDT2ConfigUnitIdleOnCoolFail
+-- Added new OID for isxModularPDU device:
+-- isxModularPduDeviceTransformerPresent (appended new list option)
+-- 02/24/09 - v3.9.5 Added new OIDs for the UPS Integrated ATS product, Air IRSC product, added new Traps for UPS support
+-- and fixed MIB compilier warnings.
+-- 02/24/09 - v3.9.6 Added new Traps and mtrapargs for the ISXC Trap Notification support.
+-- 09/18/09 - v3.9.8 Added new OIDs for the InRoom C7000 Air product.
+-- 04/14/10 - v3.9.9 Added new rPDU2 device and modified some rPDU OIDs.
+-- 06/22/10 - v4.0.0 Added traps 638 through 651 to support ATS.
+-- Updated control OIDs for rPDU2g
+-- Updates to support PX100kW UPS.
+-- Added traps 756 and 757 to support PX100kW UPS.
+-- Added upsAdvBattery, upsHighPrecBattery, and upsDiagBattery OIDs to support PX250kW/PX500kW UPS.
+-- 06/30/10 - v4.0.1 Added new OID's upsAdvBatteryFullCapacity, upsAdvInputNominalFrequency, upsAdvInputNominalVoltage,
+-- upsAdvInputBypassNominalFrequency, upsAdvInputBypassNominalVoltage, upsBasicSystemInternalTemperature,
+-- upsAdvOutputNominalFrequency, upsAdvOutputActivePower and upsAdvOutputApparentPower.
+-- Added traps 734 to 739 to support Galaxy 300 and Galaxy 7000 UPS.
+-- Added SyOid's galaxy300UPS10kVA33, galaxy300UPS15kVA33, galaxy300UPS20kVA33,
+-- galaxy300UPS30kVA33, galaxy300UPS40kVA33, galaxy300UPS10kVA31, galaxy300UPS15kVA31,
+-- galaxy300UPS20kVA31 and galaxy300UPS30kVA31,galaxy7000UPS200kVA,galaxy7000UPS250kVA,
+-- galaxy7000UPS300kVA,galaxy7000UPS400kVA,galaxy7000UPS500kVA,galaxy7000SSC800kVA,
+-- galaxy7000SSC1200kVA and galaxy7000SSC2000kVA.
+-- 10/27/10 - v4.0.2 Added Idle on Cool Fail and Fan Speed Control OIDs for the InRow ACRC.
+-- Added new OID's for Odin UPS upsAdvInputStatisticsTable, upsAdvInputApparentPower,
+-- upsAdvInputVoltageTHD, upsAdvInputBypassVoltageTHD, upsAdvInputPeakCurrent, upsAdvInputBypassPeakCurrent,
+-- upsAdvOutputStatisticsTable, upsAdvOutputPeakCurrent, upsAdvOutputCurrentTHD, upsAdvOutputCrestFactor,
+-- upsAdvStateTotaltimeonbattery, upsAdvStateTotaltimeonbypass, upsAdvStateTotaltimeonNormal,
+-- upsAdvStateNumberoftimesonbattery, upsAdvStateNumberoftimesbypass, upsAdvStateNumberoftimesNormal,
+-- subfeedBreakerUpperAcceptPowerCritical, upsParallelInputMaximumCurrent, upsParallelTotalOutputPower,
+-- upsParallelTotalOutputApparentPower, upsParallelInputCurrent, upsParallelInputActivePower,
+-- upsParallelInputApparentPower, upsParallelInputVoltage, upsParallelInputMaxVoltage,
+-- upsParallelInputMaxCurrent, upsParallelInputTotalActivePower, upsParallelInputTotalApparentPower,
+-- upsParallelOutputCurrent, upsParallelOutputLoad, upsParallelOutputPercentLoad, upsParallelOutputPower,
+-- upsParallelOutputApparentPower, upsParallelDiagSubSysBreakerStatus, upsParallelDiagSubSysBreakerName
+-- and upsParallelOutputTotalPercentLoad.
+-- Modified the OID upsAdvConfigOutputFreqRange and upsParallelSysRedundancy.
+-- 01/13/11 - v4.0.3 Added new oids, upsHighPrecOutputEfficiency and upsHighPrecOutputEnergyUsage.
+-- Added green mode for bit 51 of upsBasicStateOutputState.
+-- Added traps 758 to 763 to support UPS firmware update.
+-- Deprecated all OIDs off branch mfiletransfer
+-- Added rPDU2 Metered Outlet Data
+-- 08/17/11 - v4.0.4 Updated several rPDU2 and rPDU OIDs.
+-- 12/07/11 - v4.0.5 Added new OID's for SYPX upsPhaseOutputPowerFactor and symmetraPxDisplay.
+-- Added SYS OID's for different Caphorn models galaxy5000UPS20KVA, galaxy5000UPS30KVA, galaxy5000UPS40KVA
+-- galaxy5000UPS50KVA, galaxy5000UPS60KVA , galaxy5000UPS80KVA, galaxy5000UPS100KVA, galaxy5000UPS120KVA
+-- galaxy5000UPS130KVA, galaxy5500UPS20KVA, galaxy5500UPS30KVA, galaxy5500UPS40KVA, galaxy5500UPS50KVA
+-- galaxy5500UPS60KVA, galaxy5500UPS80KVA, galaxy5500UPS100KVA, galaxy5500UPS120KVA, galaxy5500UPS130KVA
+-- and new OID upsAdvStateEcomode
+-- 06/05/12 - v4.0.6 Added new OID rPDUIdentDeviceLineToNeutralVoltage for AP7823 Rack PDU.
+-- 06/20/12 - v4.0.6 Added new rPDU2Group OID table for AP84xx, AP86xx, AP88xx, AP89xx Rack PDUs.
+-- 08/10/12 - v4.0.6 Added new OIDs for SYPX 250/500 upsAdvConfigWarningAlarmDelay, upsAdvConfigInformationalAlarmDelay, upsDiagSwitchGearInstallationLoadPct,
+-- upsParallelOutputActivePowerTable,upsParallelSysSwitchGearInstallationLoadPct, upsParallelSysRedundancyStatus and upsParallelSysName.
+-- Modified the description for upsBasicBatteryLastReplaceDate and bit 51 of upsBasicStateOutputState.
+-- Updated upsBasicOutputStatus and upsBasicSystemStatus.
+-- 08/10/12 - v4.0.6 Added SYS OIDs for different Caphorn models galaxy9000UPS, galaxy9000SSC, galaxy9000UPSWithSSC, galaxy9000FreqConverter, eps6000UPS,
+-- eps6000SSC, eps6000UPSWithSSC, eps6000FreqConverter, eps7000UPS, eps7000SSC, eps7000UPSWithSSC,
+-- eps7000FreqConverter, eps8000UPS, eps8000SSC, eps8000UPSWithSSC, eps8000FreqConverter.
+-- Modified the description for bits 53 to 56 of upsBasicStateOutputState.
+-- 02/22/13 -v4.0.8 Added OIDs upsAdvBatteryInternalSKU, upsAdvBatteryExternalSKU, upsAdvBatteryRecommendedReplaceDate,
+-- upsAdvConfigGreenMode, upsAdvConfigLCDLocalLanguage, upsAdvConfigLCDLockOut,
+-- upsAdvConfigChargerRate, and upsAdvConfigBatterySelection for the SUMX application.
+
+-- ********************************************************************************************
+-- ********************************************************************************************
+-- PowerNet-MIB { iso org(3) dod(6) internet(1) private(4)
+-- enterprises(1) apc(318) }
+
+PowerNet-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+ enterprises, IpAddress, Gauge, TimeTicks FROM RFC1155-SMI
+ DisplayString FROM RFC1213-MIB
+ OBJECT-TYPE FROM RFC-1212
+ TRAP-TYPE FROM RFC-1215;
+-- IMPORTS End
+
+apc OBJECT IDENTIFIER ::= { enterprises 318 }
+
+products OBJECT IDENTIFIER ::= { apc 1 }
+apcmgmt OBJECT IDENTIFIER ::= { apc 2 }
+
+hardware OBJECT IDENTIFIER ::= { products 1 }
|
@@ -1,863 +0,0 @@
-#!/bin/bash
-#########################################################################
-# Script: check_equallogic #
-# Author: Claudio Kuenzler www.claudiokuenzler.com #
-# Purpose: Monitor Dell Equallogic with Nagios #
-# Description: Checks Dell Equallogic via SNMP. #
-# Can be used to query status and performance info #
-# Tested on: Check the following web page for compatibility matrix: #
-# claudiokuenzler.com/nagios-plugins/check_equallogic.php #
-# License: GPLv2 #
-# History: #
-# 20091109 Started Script programming checks: #
-# health, disk, raid, uptime, ps, info #
-# 20091112 Added ethif, conn #
-# 20091118 Added diskusage #
-# 20091119 Bugfix on Outputs (removed Pipes) #
-# 20091121 Public Release #
-# 20091204 Bugfix (removed IP addresses) #
-# 20091206 Bugfix (removed SNMP community names) #
-# 20091222 Fixed raid, ps, health and diskusage checks when multiple #
-# member devices exists. Mathias Sundman <mathias@openvpn.se> #
-# 20100112 Successful tests on PS5000XV - thanks to Scott Sawin #
-# 20100209 Compatibility matrix now on website (see Tested on above) #
-# 20100416 Beta Testing for rewritten ethif check #
-# 20100420 Corrected ethif output, finished new ethif check #
-# 20100526 Using proper order of snmpwalk command, thanks Roland Ripoll #
-# 20100531 Added perfdata for diskusage and connections, thx to Benoit #
-# 20100630 Corrected perfdata output (+added thresholds), thx Christian #
-# 20100809 Fixed conn type -> total of all eql members of group #
-# 20101026 /bin/sh back to /bin/bash (Ubuntu problems with /bin/dash) #
-# 20101026 Bugfix snmpwalk (vqe instead of vq), thanks Fabio Panigatti #
-# 20101102 Added fan #
-# 20101202 Added volumes (checks utilization of all volumes) #
-# 20110315 Bugfix in fan warning, diskusage output changed #
-# 20110323 Mysteriously disappeared temp check type added again #
-# 20110328 Beta Testing for etherrors check by Martin Conzelmann #
-# 20110404 Added thresholds to etherrors check by Martin Conzelmann #
-# 20110404 Bugfix in volumes check #
-# 20110407 New temp check - more information in output. M. Conzelmann #
-# 20110725 New disk check by Amir Shakoor (Bugfixes by Claudio Kuenzler)#
-# 20110804 New poolusage check by Chris Funderburg and Markus Becker #
-# 20110808 New vol check - checks single volume for utilization #
-# 20111013 Bugfix in vol check for similar vol names by Matt White #
-# 20111031 Bugfix in ethif check for int response by Francois Borlet #
-# 20120104 Bugfix in temp check if only one controller available #
-# 20120104 Bugfix in info check if only one controller available #
-# 20120123 Bugfix in volumes check #
-# 20120125 Added perfdata in volumes check, volume names now w/o quotes #
-# 20120319 Added poolconn check by Erwin Bleeker #
-# 20120330 Rewrite of poolusage (orig is now: memberusage) by E. Bleeker#
-# 20120405 Bugfix in poolusage to show result without thresholds #
-# 20120430 Added snapshots type by Roland Penner #
-# 20120503 Rewrite of info check (Fix for multiple members, FW Check) #
-# 20120815 Added percentage of raid rebuild when raid reconstructing #
-# 20120821 Minor bugfix in vol/volumes check (added space in perfdata) #
-#########################################################################
-# Usage: ./check_equallogic -H host -C community -t type [-v volume] [-w warning] [-c critical]
-#########################################################################
-help="check_equallogic (c) 2009-2012 Claudio Kuenzler (published under GPL licence)\n
-Usage: ./check_equallogic -H host -C community -t type [-v volume] [-w warning] [-c critical]\n
-Options:\n-H Hostname\n-C SNMP-Community name (at least read-only)\n-t Type to check, see list below\n-v Name of volume to check\n-w Warning Threshold\n-c Critical Threshold\n
-Requirements: snmpwalk, awk, grep, wc\n
-types:\nconn -> Checks total number of ISCSI connections (if no thresholds are given, outputs information)
-disk -> Checks Status of all disks
-diskusage -> Checks the actual usage of the defined raid (if no thresholds are given, outputs information)
-etherrors -> Checks ethernet interfaces for ethernet packet errors (thresholds possible)
-ethif -> Checks ethernet interfaces (if no thresholds are given, outputs information)
-fan -> Status of Fans
-health -> Overall health status of Equallogic device
-info -> Shows some Information and checks for same firmware version
-memberusage -> Shows disk utilisation of all members of the same group (if no thresholds are given, outputs information)
-poolconn -> Check highest number of ISCSI connections per pool (if no thresholds are given, outputs information)
-poolusage -> Checks utilization of pools (if no thresholds are given, outputs information)
-ps -> Checks Power Supply/Supplies
-raid -> Checks RAID status
-snapshots -> Checks Snapshot Reserve status (warning level is taken from the equallogic volume config, critical level can be set with -c )
-temp -> Checks Temperature sensors
-uptime -> Shows uptime
-vol -> Checks a single volume, must be used with -v option (if no thresholds are given, outputs information)
-volumes -> Checks utilization of all ISCSI volumes (if no thresholds are given, outputs information)"
-
-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=/usr/local/bin:/usr/bin:/bin # Set path
-
-for cmd in snmpwalk awk grep wc [
-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:C:t:v:w:c:" Input;
-do
- case ${Input} in
- H) host=${OPTARG};;
- C) community=${OPTARG};;
- t) type=${OPTARG};;
- v) volume=${OPTARG};;
- w) warning=${OPTARG};;
- c) critical=${OPTARG};;
- *) echo "Wrong option given. Please use options -H for host, -C for SNMP-Community, -t for type, -w for warning and -c for critical"
- exit 1
- ;;
- esac
-done
-
-
-# Check Different Types
-#########################################################################
- case ${type} in
- health)
- healthstatus=$(snmpwalk -v 2c -O vqe -c ${community} ${host} 1.3.6.1.4.1.12740.2.1.5.1.1)
-
- s_crit=0; s_warn=0; s_ok=0; s_unknown=0
- for s in $healthstatus
- do
- if [ "$s" = "3" ]; then s_crit=$((s_crit + 1)); fi
- if [ "$s" = "2" ]; then s_warn=$((s_warn + 1)); fi
- if [ "$s" = "1" ]; then s_ok=$((s_ok + 1)); fi
- if [ "$s" = "0" ]; then s_unkown=$((s_unknown + 1)); fi
- done
-
- if [ $s_crit -gt 0 ]; then echo "OVERALL HEALTH CRITICAL"; exit ${STATE_CRITICAL}; fi
- if [ $s_warn -gt 0 ]; then echo "OVERALL HEALTH WARNING"; exit ${STATE_WARNING}; fi
- if [ $s_unknown -gt 0 ]; then echo "OVERALL HEALTH UNKNOWN"; exit ${STATE_UNKNOWN}; fi
- if [ $s_ok -gt 0 ]; then echo "OVERALL HEALTH OK"; exit ${STATE_OK}; fi
- ;;
-
- temp)
- #get names and temperatures
- declare -a sensornames=($(snmpwalk -v 2c -O vqe -c ${community} ${host} .1.3.6.1.4.1.12740.2.1.6.1.2 | tr ' ' '_' | tr -d '"' ))
- declare -a sensortemp=($(snmpwalk -v 2c -O vqe -c ${community} ${host} .1.3.6.1.4.1.12740.2.1.6.1.3 | awk -F : '{print $1}' | tr '\n' ' '))
- declare -a sensortemp_min=($(snmpwalk -v 2c -O vqe -c ${community} ${host} .1.3.6.1.4.1.12740.2.1.6.1.8 | awk -F : '{print $1}' | tr '\n' ' '))
- declare -a sensortemp_max=($(snmpwalk -v 2c -O vqe -c ${community} ${host} .1.3.6.1.4.1.12740.2.1.6.1.6 | awk -F : '{print $1}' | tr '\n' ' '))
-
- # put this name, temp... together
- c=0
- for line in ${sensornames[@]}
- do
-
- if [ ${sensortemp[${c}]} -gt 0 ]
- then
- perfdata=$perfdata" ${sensornames[$c]}=${sensortemp[${c}]};${sensortemp_min[${c}]};${sensortemp_max[${c}]}"
- #Check if state is CRITICAL. Compare against MIN and MAX
- if [ ${sensortemp[${c}]} -gt ${sensortemp_max[${c}]} ] || [ ${sensortemp[${c}]} -lt ${sensortemp_min[${c}]} ]
- then
- sensorfinalcrit[${c}]="${sensornames[$c]} => ${sensortemp[${c}]}"
- fi
- fi
-
- let c++
- done
-
- #Cut leading blank
- perfdata=$( echo $perfdata | cut -d' ' -f 2-)
-
- if [[ ${#sensorfinalcrit[*]} -gt 0 ]]
- then echo "CRITICAL Sensor: ${sensorfinalcrit[*]} | $perfdata"; exit ${STATE_CRITICAL}
- elif [[ ${#sensorfinalwarn[*]} -gt 0 ]]
- then echo "WARNING Sensor: ${sensorfinalwarn[*]} | $perfdata"; exit ${STATE_WARNING}
- elif [[ ${#sensorunknown[*]} -gt 0 ]]
- then echo "UNKNOWN Check Sensors, an unknown error occured | $perfdata"; exit ${STATE_UNKNOWN}
- else echo "All Sensors OK | $perfdata"; exit ${STATE_OK}
- fi
- ;;
-
- diskold)
- diskstatusok=$(snmpwalk -v 2c -O vq -c ${community} ${host} 1.3.6.1.4.1.12740.3.1.1.1.8 | grep 1 | wc -l)
- diskstatusspare=$(snmpwalk -v 2c -O vq -c ${community} ${host} 1.3.6.1.4.1.12740.3.1.1.1.8 | grep 2 | wc -l)
- diskstatusfailed=$(snmpwalk -v 2c -O vq -c ${community} ${host} 1.3.6.1.4.1.12740.3.1.1.1.8 | grep 3 | wc -l)
- diskstatusoff=$(snmpwalk -v 2c -O vq -c ${community} ${host} 1.3.6.1.4.1.12740.3.1.1.1.8 | grep 4 | wc -l)
- diskstatusaltsig=$(snmpwalk -v 2c -O vq -c ${community} ${host} 1.3.6.1.4.1.12740.3.1.1.1.8 | grep 5 | wc -l)
- diskstatustoosmall=$(snmpwalk -v 2c -O vq -c ${community} ${host} 1.3.6.1.4.1.12740.3.1.1.1.8 | grep 6 | wc -l)
- diskstatushistfailures=$(snmpwalk -v 2c -O vq -c ${community} ${host} 1.3.6.1.4.1.12740.3.1.1.1.8 | grep 7 | wc -l)
- diskstatusunsupported=$(snmpwalk -v 2c -O vq -c ${community} ${host} 1.3.6.1.4.1.12740.3.1.1.1.8 | grep 8 | wc -l)
- if [ ${diskstatusfailed} -gt 0 ] || [ ${diskstatustoosmall} -gt 0 ] || [ ${diskstatushistfailures} -gt 0 ] || [ ${diskstatusunsupported} -gt 0 ]
- then disksumcritical=$(($diskstatusfailed + $diskstatustoosmall + $diskstatushistfailures + $diskstatusunsupported))
- echo "DISK CRITICAL ${disksumcritical} disk(s) in critical state"; exit ${STATE_CRITICAL}
- elif [ ${diskstatusoff} -gt 0 ] || [ ${diskstatusaltsig} -gt 0 ]
- then disksumwarning=$(( ${diskstatusoff} + ${diskstatusaltsig} ))
- echo "DISK WARNING $disksumwarning disk(s) in warning state"; exit ${STATE_WARNING}
- else echo "DISK OK ${diskstatusok} disks OK ${diskstatusspare} disks spare"; exit ${STATE_OK}
- fi
- ;;
|