Index: includes/definitions/os.inc.php =================================================================== --- includes/definitions/os.inc.php (revision 6716) +++ includes/definitions/os.inc.php (working copy) @@ -511,6 +511,20 @@ $config['os'][$os]['mibs'][] = "EQLDISK-MIB"; $config['os'][$os]['mib_blacklist'][] = "BGP4-MIB"; +// Compellent +$os = "compellent"; +$config['os'][$os]['text'] = "Storage Center"; +$config['os'][$os]['type'] = "storage"; +$config['os'][$os]['discovery_os'] = "freebsd"; +$config['os'][$os]['icon'] = "dell"; +// $config['os'][$os]['sysObjectID'][] = ".1.3.6.1.4.1.8072.3.2.8"; // sysObjectID matches FreeBSD +$config['os'][$os]['sysDescr'][] = "/compellent/i"; +$config['os'][$os]['mib_dirs'][] = "dell"; +$config['os'][$os]['mibs'][] = "COMPELLENT-MIB"; +$config['os'][$os]['mib_blacklist'][] = "HOST-RESOURCES-MIB"; +$config['os'][$os]['mib_blacklist'][] = "ENTITY-MIB"; +$config['os'][$os]['mib_blacklist'][] = "UCD-SNMP-MIB"; + // AdTran $os = "adtran-aos"; Index: includes/definitions/sensors.inc.php =================================================================== --- includes/definitions/sensors.inc.php (revision 6716) +++ includes/definitions/sensors.inc.php (working copy) @@ -499,7 +499,16 @@ $config['status_states']['ccpower-mib-alarmstatus'][1] = array('name' => 'inactive', 'event' => 'ok'); $config['status_states']['ccpower-mib-alarmstatus'][2] = array('name' => 'active', 'event' => 'alert'); +// COMPELLENT-MIB +$config['status_states']['compellent-mib-state'][1] = array('name' => 'up', 'event' => 'ok'); +$config['status_states']['compellent-mib-state'][2] = array('name' => 'down', 'event' => 'alert'); +$config['status_states']['compellent-mib-state'][3] = array('name' => 'degraded', 'event' => 'warning'); +$config['status_states']['compellent-mib-cache-state'][0] = array('name' => 'noBattery', 'event' => 'alert'); +$config['status_states']['compellent-mib-cache-state'][1] = array('name' => 'normal', 'event' => 'ok'); +$config['status_states']['compellent-mib-cache-state'][2] = array('name' => 'expirationPending', 'event' => 'warning'); +$config['status_states']['compellent-mib-cache-state'][3] = array('name' => 'expired', 'event' => 'warning'); + // End sensor states // FIXME. $config['sensor_types'] >> $config['sensor']['types'] Index: includes/discovery/sensors/compellent-mib.inc.php =================================================================== --- includes/discovery/sensors/compellent-mib.inc.php (revision 0) +++ includes/discovery/sensors/compellent-mib.inc.php (working copy) @@ -0,0 +1,79 @@ +<?php + +/** + * Observium + * + * This file is part of Observium. + * + * @package observium + * @subpackage discovery + * @copyright (C) 2006-2015 Adam Armstrong + * + */ + +$mib = 'COMPELLENT-MIB'; + +$cml['temp'] = snmpwalk_cache_oid($device, 'scEnclTempTable', array(), $mib); +$cml['fan'] = snmpwalk_cache_oid($device, 'scEnclFanTable', array(), $mib); +$cml['ctrl'] = snmpwalk_cache_oid($device, 'scCtlrEntry', array(), $mib); +$cml['disk'] = snmpwalk_cache_oid($device, 'scDiskEntry', array(), $mib); +$cml['cache'] = snmpwalk_cache_oid($device, 'ScCacheEntry', array(), $mib); + +foreach ($cml['temp'] as $index => $entry) +{ + $oid = '.1.3.6.1.4.1.16139.2.23.1.5.'.$index; + $descr = $entry['scEnclTempLocation']; + $value = $entry['scEnclTempCurrentC']; + if (is_numeric($value)) + { + discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, 'compellent', $descr, 1, $value); + } +} + +foreach ($cml['fan'] as $index => $entry) +{ + $oid = '.1.3.6.1.4.1.16139.2.20.1.3.'.$index; + $descr = $entry['scEnclFanLocation']; + $value = $entry['scEnclFanStatus']; + if ($value) + { + discover_status($device, $oid, 'scEnclFanStatus.'.$index, 'compellent-mib-state', $descr, $value, array('entPhysicalClass' => 'fan')); + } +} + +foreach ($cml['ctrl'] as $index => $entry) +{ + $oid = '.1.3.6.1.4.1.16139.2.13.1.3.'.$index; + $descr = 'Controller '.$entry['scCtlrNbr'].' ('.$entry['scCtlrName'].')'; + $value = $entry['scCtlrStatus']; + if ($value) + { + discover_status($device, $oid, 'scCtlrStatus.'.$index, 'compellent-mib-state', $descr, $value, array('entPhysicalClass' => 'other')); + } +} + +foreach ($cml['disk'] as $index => $entry) +{ + $oid = '.1.3.6.1.4.1.16139.2.14.1.3.'.$index; + $descr = 'Disk '.$entry['scDiskNamePosition']; + $value = $entry['scDiskStatus']; + if ($value) + { + discover_status($device, $oid, 'scDiskStatus.'.$index, 'compellent-mib-state', $descr, $value, array('entPhysicalClass' => 'disk')); + } +} + +foreach ($cml['cache'] as $index => $entry) +{ + $oid = '.1.3.6.1.4.1.16139.2.28.1.5.'.$index; + $descr = 'Controller '.$entry['scCacheNbr'].' Cache'; + $value = $entry['scCacheBatStat']; + if ($value) + { + discover_status($device, $oid, 'scCacheBatStat.'.$index, 'compellent-mib-cache-state', $descr, $value, array('entPhysicalClass' => 'other')); + } +} + +unset($cml['temp'], $cml['fan'], $cml['ctrl'], $cml['disk'], $cml['cache'], $oid, $descr, $value); + +// EOF Index: includes/polling/os/compellent.inc.php =================================================================== --- includes/polling/os/compellent.inc.php (revision 0) +++ includes/polling/os/compellent.inc.php (working copy) @@ -0,0 +1,20 @@ +<?php + +/** + * Observium + * + * This file is part of Observium. + * + * @package observium + * @subpackage poller + * @copyright (C) 2006-2015 Adam Armstrong + * + */ + +$mib = 'COMPELLENT-MIB'; + +$version = snmp_get($device, 'productIDVersion.0', '-OQv', $mib); +$hardware = 'Compellent '.trim(snmp_get($device, 'scEnclModel.1', '-OQv', $mib), 'EN-');; +//$serial = snmp_get($device, 'productIDSerialNumber.0', '-OQv', $mib); + +// EOF