Index: includes/definitions/mibs/dell.inc.php
===================================================================
--- includes/definitions/mibs/dell.inc.php	(revision 10393)
+++ includes/definitions/mibs/dell.inc.php	(working copy)
@@ -80,13 +80,18 @@
 $config['mibs'][$mib]['enable'] = 1;
 $config['mibs'][$mib]['identity_num'] = '.1.3.6.1.4.1.674.10892.5';
 $config['mibs'][$mib]['mib_dir'] = 'dell';
-$config['mibs'][$mib]['descr'] = 'Dell iDRAC v7 devices';
-$config['mibs'][$mib]['ra_url_http'][] = array('oid' => 'racURL.0');
+$config['mibs'][$mib]['descr'] = 'Dell iDRAC v7 and newer devices';
+$config['mibs'][$mib]['serial'][] = array('oid' => 'systemServiceTag.0'); // IDRAC-MIB-SMIv2::systemServiceTag.0 = STRING: "CXXXSPX"
+$config['mibs'][$mib]['version'][] = array('oid' => 'racFirmwareVersion.0'); // IDRAC-MIB-SMIv2::racVersion.0 = STRING: "4.10.10.10"
+$config['mibs'][$mib]['hardware'][] = array('oid' => 'racShortName.0'); // IDRAC-MIB-SMIv2::racShortName.0 = STRING: "iDRAC9"
+$config['mibs'][$mib]['asset_tag'][] = array('oid' => 'systemAssetTag.0'); // IDRAC-MIB-SMIv2::systemAssetTag.0 = ""
+$config['mibs'][$mib]['ra_url_http'][] = array('oid' => 'racURL.0'); // IDRAC-MIB-SMIv2::racURL.0 = STRING: "https://192.168.0.120:443"
 
 $config['mibs'][$mib]['status'][] = array('oid' => 'globalSystemStatus',  'descr' => 'Overall System Status', 'measured' => 'device', 'type' => 'ObjectStatusEnum', 'oid_num' => '.1.3.6.1.4.1.674.10892.5.2.1');
 $config['mibs'][$mib]['status'][] = array('oid' => 'systemLCDStatus',     'descr' => 'System LCD Status', 'measured' => 'device', 'type' => 'ObjectStatusEnum', 'oid_num' => '.1.3.6.1.4.1.674.10892.5.2.2');
 $config['mibs'][$mib]['status'][] = array('oid' => 'globalStorageStatus', 'descr' => 'Global Storage Status', 'measured' => 'device', 'type' => 'ObjectStatusEnum', 'oid_num' => '.1.3.6.1.4.1.674.10892.5.2.3');
 $config['mibs'][$mib]['status'][] = array('oid' => 'systemPowerState',    'descr' => 'System Power State', 'measured' => 'device', 'type' => 'PowerStateStatusEnum', 'oid_num' => '.1.3.6.1.4.1.674.10892.5.2.4');
+$config['mibs'][$mib]['status'][] = array('oid' => 'systemLockdownMode',    'descr' => 'System Lockdown State', 'measured' => 'device', 'type' => 'SystemLockdownModeEnum', 'oid_num' => '.1.3.6.1.4.1.674.10892.5.1.3.20');
 
 $type = 'VoltageDiscreteReadingEnum';
 $config['mibs'][$mib]['states'][$type][1] = array('name' => 'voltageIsGood', 'event' => 'ok');
@@ -118,10 +123,252 @@
 $config['mibs'][$mib]['states'][$type][3] = array('name' => 'off', 'event' => 'warning');
 $config['mibs'][$mib]['states'][$type][4] = array('name' => 'on', 'event' => 'ok');
 
+$type = 'SystemLockdownModeEnum';
+$config['mibs'][$mib]['states'][$type][0] = array('name' => 'disabled', 'event' => 'ok');
+$config['mibs'][$mib]['states'][$type][1] = array('name' => 'enabled', 'event' => 'ok');
+$config['mibs'][$mib]['states'][$type][2] = array('name' => 'unknown', 'event' => 'ignore');
+
 //$config['mibs'][$mib]['status']['voltageProbeStatus']['states']         = 'StatusProbeEnum';
 //$config['mibs'][$mib]['status']['voltageProbeDiscreteStatus']['states'] = 'VoltageDiscreteReadingEnum';
 //$config['mibs'][$mib]['status']['temperatureProbeStatus']['states']     = 'StatusProbeEnum';
 
+// IDRAC-MIB-SMIv2::temperatureProbechassisIndex.1.1 = INTEGER: 1
+// IDRAC-MIB-SMIv2::temperatureProbeIndex.1.1 = INTEGER: 1
+// IDRAC-MIB-SMIv2::temperatureProbeStateCapabilities.1.1 = INTEGER: 0
+// IDRAC-MIB-SMIv2::temperatureProbeStateSettings.1.1 = INTEGER: enabled(2)
+// IDRAC-MIB-SMIv2::temperatureProbeStatus.1.1 = INTEGER: ok(3)
+// IDRAC-MIB-SMIv2::temperatureProbeReading.1.1 = INTEGER: 250
+// IDRAC-MIB-SMIv2::temperatureProbeType.1.1 = INTEGER: temperatureProbeTypeIsAmbientESM(3)
+// IDRAC-MIB-SMIv2::temperatureProbeLocationName.1.1 = STRING: "System Board Inlet Temp"
+// IDRAC-MIB-SMIv2::temperatureProbeUpperCriticalThreshold.1.1 = INTEGER: 470
+// IDRAC-MIB-SMIv2::temperatureProbeUpperNonCriticalThreshold.1.1 = INTEGER: 420
+// IDRAC-MIB-SMIv2::temperatureProbeLowerNonCriticalThreshold.1.1 = INTEGER: 30
+// IDRAC-MIB-SMIv2::temperatureProbeLowerCriticalThreshold.1.1 = INTEGER: -70
+// IDRAC-MIB-SMIv2::temperatureProbeProbeCapabilities.1.1 = INTEGER: 15
+
+$config['mibs'][$mib]['sensor'][] = array(
+  'oid'                 => 'temperatureProbeReading',
+  'oid_descr'           => 'temperatureProbeLocationName',
+  'descr_transform'     => [ 'action' => 'replace', 'from' => [ ' (unknown)', 'Temp' ], 'to' => '' ],
+  'oid_extra'           => 'temperatureProbeStateSettings',
+  'class'               => 'temperature',
+  'oid_num'             => '.1.3.6.1.4.1.674.10892.5.4.700.20.1.6',
+  'scale'               => 0.1,
+  'limit_scale'         => 0.1,
+  'oid_limit_high'      => 'temperatureProbeUpperCriticalThreshold',
+  'oid_limit_high_warn' => 'temperatureProbeUpperNonCriticalThreshold',
+  'oid_limit_low'       => 'temperatureProbeLowerCriticalThreshold',
+  'oid_limit_low_warn'  => 'temperatureProbeLowerNonCriticalThreshold',
+  'test'                => [ 'field' => 'temperatureProbeStateSettings', 'operator' => 'eq', 'value' => 'enabled' ],
+  'rename_rrd'          => 'temperatureProbeReading-%index%'
+);
+
+// IDRAC-MIB-SMIv2::coolingDevicechassisIndex.1.1 = INTEGER: 1
+// IDRAC-MIB-SMIv2::coolingDeviceIndex.1.1 = INTEGER: 1
+// IDRAC-MIB-SMIv2::coolingDeviceStateCapabilities.1.1 = INTEGER: 0
+// IDRAC-MIB-SMIv2::coolingDeviceStateSettings.1.1 = INTEGER: enabled(2)
+// IDRAC-MIB-SMIv2::coolingDeviceStatus.1.1 = INTEGER: ok(3)
+// IDRAC-MIB-SMIv2::coolingDeviceReading.1.1 = INTEGER: 2880
+// IDRAC-MIB-SMIv2::coolingDeviceType.1.1 = INTEGER: coolingDeviceTypeIsAFan(3)
+// IDRAC-MIB-SMIv2::coolingDeviceLocationName.1.1 = STRING: "System Board Fan1 RPM"
+// IDRAC-MIB-SMIv2::coolingDeviceLowerNonCriticalThreshold.1.1 = INTEGER: 840
+// IDRAC-MIB-SMIv2::coolingDeviceLowerCriticalThreshold.1.1 = INTEGER: 600
+// IDRAC-MIB-SMIv2::coolingDevicecoolingUnitIndexReference.1.1 = INTEGER: 1
+// IDRAC-MIB-SMIv2::coolingDeviceSubType.1.1 = INTEGER: coolingDeviceSubTypeIsAPowerSupplyFanThatReadsinRPM(5)
+// IDRAC-MIB-SMIv2::coolingDeviceProbeCapabilities.1.1 = INTEGER: 0
+// IDRAC-MIB-SMIv2::coolingDeviceFQDD.1.1 = STRING: "Fan.Embedded.1"
+
+$config['mibs'][$mib]['sensor'][] = array(
+  'oid'                 => 'coolingDeviceReading',
+  'oid_descr'           => 'coolingDeviceLocationName',
+  'descr_transform'     => [ 'action' => 'replace', 'from' => [ ' (unknown)', 'RPM', ' Sys ' ], 'to' => [ '', '', ' ' ] ],
+  'oid_extra'           => [ 'coolingDeviceStateSettings' ],
+  'class'               => 'fanspeed',
+  'oid_num'             => '.1.3.6.1.4.1.674.10892.5.4.700.12.1.6',
+  'oid_limit_high'      => 'coolingDeviceUpperCriticalThreshold',
+  'oid_limit_high_warn' => 'coolingDeviceUpperNonCriticalThreshold',
+  'oid_limit_low'       => 'coolingDeviceLowerCriticalThreshold',
+  'oid_limit_low_warn'  => 'coolingDeviceLowerNonCriticalThreshold',
+  'test'                => [ 'field' => 'coolingDeviceStateSettings', 'operator' => 'eq', 'value' => 'enabled' ],
+  'rename_rrd'          => 'coolingDeviceReading-%index%'
+);
+
+// IDRAC-MIB-SMIv2::voltageProbechassisIndex.1.1 = INTEGER: 1
+// IDRAC-MIB-SMIv2::voltageProbeIndex.1.1 = INTEGER: 1
+// IDRAC-MIB-SMIv2::voltageProbeStateCapabilities.1.1 = INTEGER: 0
+// IDRAC-MIB-SMIv2::voltageProbeStateSettings.1.1 = INTEGER: enabled(2)
+// IDRAC-MIB-SMIv2::voltageProbeStatus.1.1 = INTEGER: ok(3)
+// IDRAC-MIB-SMIv2::voltageProbeType.1.1 = INTEGER: voltageProbeTypeIsDiscrete(16)
+// IDRAC-MIB-SMIv2::voltageProbeLocationName.1.1 = STRING: "System Board DIMM PG"
+// IDRAC-MIB-SMIv2::voltageProbeProbeCapabilities.1.1 = INTEGER: 0
+// IDRAC-MIB-SMIv2::voltageProbeDiscreteReading.1.1 = INTEGER: voltageIsGood(1)
+
+$config['mibs'][$mib]['sensor'][] = array(
+  'oid'                 => 'voltageProbeReading',
+  'oid_descr'           => 'voltageProbeLocationName',
+  'descr_transform'     => [ 'action' => 'replace', 'from' => [ ' (unknown)', '1 Voltage 1', '2 Voltage 2', 'PS' ],
+                                                    'to'   => [ '', '1', '2', 'Power supply ' ] ],
+  'oid_extra'           => 'voltageProbeStateSettings',
+  'class'               => 'voltage',
+  'oid_num'             => '.1.3.6.1.4.1.674.10892.5.4.600.20.1.6',
+  'scale'               => 0.001,
+  'limit_scale'         => 0.001,
+  'oid_limit_high'      => 'voltageProbeUpperCriticalThreshold',
+  'oid_limit_high_warn' => 'voltageProbeUpperNonCriticalThreshold',
+  'oid_limit_low'       => 'voltageProbeLowerCriticalThreshold',
+  'oid_limit_low_warn'  => 'voltageProbeLowerNonCriticalThreshold',
+  'test'                => [ 'field' => 'voltageProbeStateSettings', 'operator' => 'eq', 'value' => 'enabled' ],
+);
+
+$config['mibs'][$mib]['status'][] = array(
+  'oid'                 => 'voltageProbeDiscreteReading',
+  'oid_num'             => '.1.3.6.1.4.1.674.10892.5.4.600.20.1.16',
+  'descr'               => 'Voltage %voltageProbeLocationName%',
+  'oid_extra'           => [ 'voltageProbeType', 'voltageProbeLocationName' ],
+  'measured'            => 'other',
+  'type'                => 'DellVoltageDiscreteReading',
+  'test'                => [ 'field' => 'voltageProbeType', 'operator' => 'eq', 'value' => 'voltageProbeTypeIsDiscrete' ],
+);
+
+$type = 'DellVoltageDiscreteReading';
+$config['mibs'][$mib]['states'][$type][1] = array('name' => 'voltageIsGood',  'event' => 'ok');
+$config['mibs'][$mib]['states'][$type][2] = array('name' => 'voltageIsBad',   'event' => 'alert');
+
+// IDRAC-MIB-SMIv2::amperageProbechassisIndex.1.1 = INTEGER: 1
+// IDRAC-MIB-SMIv2::amperageProbechassisIndex.1.2 = INTEGER: 1
+// IDRAC-MIB-SMIv2::amperageProbechassisIndex.1.3 = INTEGER: 1
+// IDRAC-MIB-SMIv2::amperageProbeIndex.1.1 = INTEGER: 1
+// IDRAC-MIB-SMIv2::amperageProbeIndex.1.2 = INTEGER: 2
+// IDRAC-MIB-SMIv2::amperageProbeIndex.1.3 = INTEGER: 3
+// IDRAC-MIB-SMIv2::amperageProbeStateCapabilities.1.1 = INTEGER: 0
+// IDRAC-MIB-SMIv2::amperageProbeStateCapabilities.1.2 = INTEGER: 0
+// IDRAC-MIB-SMIv2::amperageProbeStateCapabilities.1.3 = INTEGER: 0
+// IDRAC-MIB-SMIv2::amperageProbeStateSettings.1.1 = INTEGER: enabled(2)
+// IDRAC-MIB-SMIv2::amperageProbeStateSettings.1.2 = INTEGER: enabled(2)
+// IDRAC-MIB-SMIv2::amperageProbeStateSettings.1.3 = INTEGER: enabled(2)
+// IDRAC-MIB-SMIv2::amperageProbeStatus.1.1 = INTEGER: ok(3)
+// IDRAC-MIB-SMIv2::amperageProbeStatus.1.2 = INTEGER: ok(3)
+// IDRAC-MIB-SMIv2::amperageProbeStatus.1.3 = INTEGER: ok(3)
+// IDRAC-MIB-SMIv2::amperageProbeReading.1.1 = INTEGER: 14
+// IDRAC-MIB-SMIv2::amperageProbeReading.1.2 = INTEGER: 10
+// IDRAC-MIB-SMIv2::amperageProbeReading.1.3 = INTEGER: 468
+// IDRAC-MIB-SMIv2::amperageProbeType.1.1 = INTEGER: amperageProbeTypeIsPowerSupplyAmps(23)
+// IDRAC-MIB-SMIv2::amperageProbeType.1.2 = INTEGER: amperageProbeTypeIsPowerSupplyAmps(23)
+// IDRAC-MIB-SMIv2::amperageProbeType.1.3 = INTEGER: amperageProbeTypeIsSystemWatts(26)
+// IDRAC-MIB-SMIv2::amperageProbeLocationName.1.1 = STRING: "PS1 Current 1"
+// IDRAC-MIB-SMIv2::amperageProbeLocationName.1.2 = STRING: "PS2 Current 2"
+// IDRAC-MIB-SMIv2::amperageProbeLocationName.1.3 = STRING: "System Board Pwr Consumption"
+// IDRAC-MIB-SMIv2::amperageProbeUpperCriticalThreshold.1.3 = INTEGER: 1300
+// IDRAC-MIB-SMIv2::amperageProbeUpperNonCriticalThreshold.1.3 = INTEGER: 1170
+// IDRAC-MIB-SMIv2::amperageProbeProbeCapabilities.1.1 = INTEGER: 0
+// IDRAC-MIB-SMIv2::amperageProbeProbeCapabilities.1.2 = INTEGER: 0
+// IDRAC-MIB-SMIv2::amperageProbeProbeCapabilities.1.3 = INTEGER: 5
+
+$config['mibs'][$mib]['sensor'][] = array(
+  'table'               => 'amperageProbeTable',
+  'oid'                 => 'amperageProbeReading',
+  'oid_num'             => '.1.3.6.1.4.1.674.10892.5.4.600.30.1.6',
+  'oid_descr'           => 'amperageProbeLocationName',
+  'descr_transform'     => [ 'action' => 'replace', 'from' => [ ' (unknown)', '1 Current 1', '2 Current 2', ' Pwr Consumption', 'PS' ], 'to' => [ '', '1', '2', '', 'Power supply ' ] ],
+  'oid_class'           => 'amperageProbeType',
+  'map_class'           => [ 'amperageProbeTypeIsPowerSupplyAmps' => 'current', 'amperageProbeTypeIsSystemWatts' => 'power' ],
+  'oid_scale'           => 'amperageProbeType',
+  'map_scale'           => [ 'amperageProbeTypeIsPowerSupplyAmps' => '0.1', 'amperageProbeTypeIsSystemWatts' => 1 ],
+  'limit_scale'         => 'scale',
+  'oid_limit_high'      => 'amperageProbeUpperCriticalThreshold',
+  'oid_limit_high_warn' => 'amperageProbeUpperNonCriticalThreshold',
+);
+
+// IDRAC-MIB-SMIv2::powerSupplychassisIndex.1.1 = INTEGER: 1
+// IDRAC-MIB-SMIv2::powerSupplychassisIndex.1.2 = INTEGER: 1
+// IDRAC-MIB-SMIv2::powerSupplyIndex.1.1 = INTEGER: 1
+// IDRAC-MIB-SMIv2::powerSupplyIndex.1.2 = INTEGER: 2
+// IDRAC-MIB-SMIv2::powerSupplyStateCapabilitiesUnique.1.1 = INTEGER: 0
+// IDRAC-MIB-SMIv2::powerSupplyStateCapabilitiesUnique.1.2 = INTEGER: 0
+// IDRAC-MIB-SMIv2::powerSupplyStateSettingsUnique.1.1 = INTEGER: acPowerAndSwitchAreOnPowerSupplyIsOnIsOkAndOnline(242)
+// IDRAC-MIB-SMIv2::powerSupplyStateSettingsUnique.1.2 = INTEGER: acPowerAndSwitchAreOnPowerSupplyIsOnIsOkAndOnline(242)
+// IDRAC-MIB-SMIv2::powerSupplyStatus.1.1 = INTEGER: ok(3)
+// IDRAC-MIB-SMIv2::powerSupplyStatus.1.2 = INTEGER: ok(3)
+// IDRAC-MIB-SMIv2::powerSupplyOutputWatts.1.1 = INTEGER: 11000
+// IDRAC-MIB-SMIv2::powerSupplyOutputWatts.1.2 = INTEGER: 11000
+// IDRAC-MIB-SMIv2::powerSupplyType.1.1 = INTEGER: powerSupplyTypeIsAC(9)
+// IDRAC-MIB-SMIv2::powerSupplyType.1.2 = INTEGER: powerSupplyTypeIsAC(9)
+// IDRAC-MIB-SMIv2::powerSupplyLocationName.1.1 = STRING: "PS1 Status"
+// IDRAC-MIB-SMIv2::powerSupplyLocationName.1.2 = STRING: "PS2 Status"
+
+$config['mibs'][$mib]['status'][] = array(
+  'oid'                 => 'powerSupplyStatus',
+  'oid_descr'           => 'powerSupplyLocationName',
+  'descr_transform'     => [ 'action' => 'replace', 'from' => [ ' (unknown)', 'PS' ], 'to' => [ '', 'Power supply ' ] ],
+  'oid_extra'           => 'powerSupplyStateSettingsUnique',
+  'measured'            => 'powersupply',
+  'oid_num'             => '.1.3.6.1.4.1.674.10892.5.4.600.12.1.5',
+  'type'                => 'ObjectStatusEnum',
+  'test'                => [ 'field' => 'powerSupplyStateSettingsUnique', 'operator' => 'ne', 'value' => 0 ],
+);
+
+// IDRAC-MIB-SMIv2::chassisStateSettings.1 = INTEGER: enabled(2)
+// IDRAC-MIB-SMIv2::chassisStatus.1 = INTEGER: ok(3)
+// IDRAC-MIB-SMIv2::chassisName.1 = STRING: "Main System Chassis"
+
+$config['mibs'][$mib]['status'][] = array(
+  'oid'                 => 'chassisStatus',
+  'oid_descr'           => 'chassisName',
+  'oid_extra'           => 'chassisStateSettings',
+  'measured'            => 'chassis',
+  'oid_num'             => '.1.3.6.1.4.1.674.10892.5.4.300.10.1.4',
+  'type'                => 'ObjectStatusEnum',
+  'test'                => [ 'field' => 'chassisStateSettings', 'operator' => 'eq', 'value' => 'enabled' ],
+);
+
+// IDRAC-MIB-SMIv2::intrusionchassisIndex.1.1 = INTEGER: 1
+// IDRAC-MIB-SMIv2::intrusionIndex.1.1 = INTEGER: 1
+// IDRAC-MIB-SMIv2::intrusionStateCapabilities.1.1 = INTEGER: 0
+// IDRAC-MIB-SMIv2::intrusionStateSettings.1.1 = INTEGER: enabled(2)
+// IDRAC-MIB-SMIv2::intrusionStatus.1.1 = INTEGER: ok(3)
+// IDRAC-MIB-SMIv2::intrusionReading.1.1 = INTEGER: chassisNotBreached(1)
+// IDRAC-MIB-SMIv2::intrusionType.1.1 = INTEGER: chassisBreachDetectionWhenPowerON(1)
+// IDRAC-MIB-SMIv2::intrusionLocationName.1.1 = STRING: "System Board Intrusion"
+
+$config['mibs'][$mib]['status'][] = array(
+  //'oid'                 => 'intrusionStatus',
+  'oid'                 => 'intrusionReading',
+  'oid_descr'           => 'intrusionLocationName',
+  'oid_extra'           => 'intrusionStateSettings',
+  'measured'            => 'other',
+  'oid_num'             => '.1.3.6.1.4.1.674.10892.5.4.300.70.1.6',
+  'type'                => 'DellIntrusionReading',
+  'test'                => [ 'field' => 'intrusionStateSettings', 'operator' => 'eq', 'value' => 'enabled' ],
+);
+
+$type = 'DellIntrusionReading';
+$config['mibs'][$mib]['states'][$type][1] = array('name' => 'chassisNotBreached',         'event' => 'ok');      // chassis not breached and no uncleared breaches
+$config['mibs'][$mib]['states'][$type][2] = array('name' => 'chassisBreached',            'event' => 'alert');   // chassis currently breached
+$config['mibs'][$mib]['states'][$type][3] = array('name' => 'chassisBreachedPrior',       'event' => 'warning'); // chassis breached prior to boot and has not been cleared
+$config['mibs'][$mib]['states'][$type][4] = array('name' => 'chassisBreachSensorFailure', 'event' => 'alert');   // intrusion sensor has failed
+
+// IDRAC-MIB-SMIv2::systemBatteryChassisIndex.1.1 = INTEGER: 1
+// IDRAC-MIB-SMIv2::systemBatteryIndex.1.1 = INTEGER: 1
+// IDRAC-MIB-SMIv2::systemBatteryStateCapabilities.1.1 = INTEGER: 0
+// IDRAC-MIB-SMIv2::systemBatteryStateSettings.1.1 = INTEGER: enabled(2)
+// IDRAC-MIB-SMIv2::systemBatteryStatus.1.1 = INTEGER: ok(3)
+// IDRAC-MIB-SMIv2::systemBatteryReading.1.1 = INTEGER: presenceDetected(4)
+// IDRAC-MIB-SMIv2::systemBatteryLocationName.1.1 = STRING: "System Board CMOS Battery"
+
+$config['mibs'][$mib]['status'][] = array(
+  'oid'                 => 'systemBatteryReading',
+  'oid_descr'           => 'systemBatteryLocationName',
+  'oid_num'             => '.1.3.6.1.4.1.674.10892.5.4.600.50.1.6',
+  'measured'            => 'battery',
+  'type'                => 'DellBatteryReading',
+);
+
+$type = 'DellBatteryReading';
+//$config['mibs'][$mib]['states'][$type][0] = array('name' => 'unknown',           'event' => 'exclude');
+$config['mibs'][$mib]['states'][$type][1] = array('name' => 'predictiveFailure', 'event' => 'warning');
+$config['mibs'][$mib]['states'][$type][2] = array('name' => 'failed',            'event' => 'alert');
+$config['mibs'][$mib]['states'][$type][4] = array('name' => 'presenceDetected',  'event' => 'ok');
+
 $mib = 'DELL-STORAGE-SC-MIB';
 $config['mibs'][$mib]['enable'] = 1;
 $config['mibs'][$mib]['identity_num'] = '.1.3.6.1.4.1.16139.1';
Index: includes/discovery/sensors/idrac-mib-smiv2.inc.php
===================================================================
--- includes/discovery/sensors/idrac-mib-smiv2.inc.php	(revision 10393)
+++ includes/discovery/sensors/idrac-mib-smiv2.inc.php	(working copy)
@@ -1,153 +0,0 @@
-<?php
-
-/**
- * Observium
- *
- *   This file is part of Observium.
- *
- * @package    observium
- * @subpackage discovery
- * @copyright  (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
- *
- */
-
-/**
-IDRAC-MIB-SMIv2::coolingDevicechassisIndex.1.1 = INTEGER: 1
-IDRAC-MIB-SMIv2::coolingDeviceIndex.1.1 = INTEGER: 1
-IDRAC-MIB-SMIv2::coolingDeviceStateCapabilities.1.1 = INTEGER: 0
-IDRAC-MIB-SMIv2::coolingDeviceStateSettings.1.1 = INTEGER: enabled(2)
-IDRAC-MIB-SMIv2::coolingDeviceStatus.1.1 = INTEGER: ok(3)
-IDRAC-MIB-SMIv2::coolingDeviceReading.1.1 = INTEGER: 2880
-IDRAC-MIB-SMIv2::coolingDeviceType.1.1 = INTEGER: coolingDeviceTypeIsAFan(3)
-IDRAC-MIB-SMIv2::coolingDeviceLocationName.1.1 = STRING: "System Board Fan1 RPM"
-IDRAC-MIB-SMIv2::coolingDeviceLowerNonCriticalThreshold.1.1 = INTEGER: 840
-IDRAC-MIB-SMIv2::coolingDeviceLowerCriticalThreshold.1.1 = INTEGER: 600
-IDRAC-MIB-SMIv2::coolingDevicecoolingUnitIndexReference.1.1 = INTEGER: 1
-IDRAC-MIB-SMIv2::coolingDeviceSubType.1.1 = INTEGER: coolingDeviceSubTypeIsAPowerSupplyFanThatReadsinRPM(5)
-IDRAC-MIB-SMIv2::coolingDeviceProbeCapabilities.1.1 = INTEGER: 0
-IDRAC-MIB-SMIv2::coolingDeviceFQDD.1.1 = STRING: "Fan.Embedded.1"
-**/
-
-$oids = array ('coolingDeviceStatus', 'coolingDeviceReading', 'coolingDeviceLocationName', 'coolingDeviceLowerNonCriticalThreshold', 'coolingDeviceLowerCriticalThreshold');
-
-$data = array();
-foreach ($oids as $oid)
-{
-  $data = snmpwalk_cache_twopart_oid($device, $oid, $data, 'IDRAC-MIB-SMIv2');
-}
-
-foreach ($data as $index_a => $entries)
-{
-  foreach ($entries as $index_b => $entry)
-  {
-
-    $index = $index_a.'.'.$index_b;
-    $descr = $entry['coolingDeviceLocationName'];
-
-    // Add the numerical sensor
-    if (isset($entry['coolingDeviceReading']))
-    {
-      $oid = ".1.3.6.1.4.1.674.10892.5.4.700.12.1.6.$index";
-      $options = array();
-
-      if (isset($entry['coolingDeviceLowerNonCriticalThreshold'])) { $options['warn_low']   = $entry['coolingDeviceLowerNonCriticalThreshold']; }
-      if (isset($entry['coolingDeviceLowerCriticalThreshold']))    { $options['limit_low']  = $entry['coolingDeviceLowerCriticalThreshold']; }
-      $options['warn_high']   = NULL;
-      $options['limig_high']  = NULL;
-
-      discover_sensor('fanspeed', $device, $oid, $index, 'coolingDeviceReading', $descr, 1, $entry['coolingDeviceReading'], $options);
-    }
-
-    // Add the status indicator
-
-    if (isset($entry['coolingDeviceStatus']))
-    {
-      $options = array();
-      $oid   = ".1.3.6.1.4.1.674.10892.5.4.700.12.1.5.$index";
-    }
-
-  }
-}
-
-/**
-
-IDRAC-MIB-SMIv2::temperatureProbechassisIndex.1.1 = INTEGER: 1
-IDRAC-MIB-SMIv2::temperatureProbeIndex.1.1 = INTEGER: 1
-IDRAC-MIB-SMIv2::temperatureProbeStateCapabilities.1.1 = INTEGER: 0
-IDRAC-MIB-SMIv2::temperatureProbeStateSettings.1.1 = INTEGER: enabled(2)
-IDRAC-MIB-SMIv2::temperatureProbeStatus.1.1 = INTEGER: ok(3)
-IDRAC-MIB-SMIv2::temperatureProbeReading.1.1 = INTEGER: 250
-IDRAC-MIB-SMIv2::temperatureProbeType.1.1 = INTEGER: temperatureProbeTypeIsAmbientESM(3)
-IDRAC-MIB-SMIv2::temperatureProbeLocationName.1.1 = STRING: "System Board Inlet Temp"
-IDRAC-MIB-SMIv2::temperatureProbeUpperCriticalThreshold.1.1 = INTEGER: 470
-IDRAC-MIB-SMIv2::temperatureProbeUpperNonCriticalThreshold.1.1 = INTEGER: 420
-IDRAC-MIB-SMIv2::temperatureProbeLowerNonCriticalThreshold.1.1 = INTEGER: 30
-IDRAC-MIB-SMIv2::temperatureProbeLowerCriticalThreshold.1.1 = INTEGER: -70
-IDRAC-MIB-SMIv2::temperatureProbeProbeCapabilities.1.1 = INTEGER: 15
-
-**/
-
-$oids = array ('temperatureProbeStatus', 'temperatureProbeReading', 'temperatureProbeLocationName', 'temperatureProbeUpperCriticalThreshold', 'temperatureProbeUpperNonCriticalThreshold', 'temperatureProbeLowerNonCriticalThreshold', 'temperatureProbeLowerCriticalThreshold');
-
-$data = array();
-foreach ($oids as $oid)
-{
-  $data = snmpwalk_cache_twopart_oid($device, $oid, $data, 'IDRAC-MIB-SMIv2');
-}
-
-foreach ($data as $index_a => $entries)
-{
-  foreach ($entries as $index_b => $entry)
-  {
-
-    $index = $index_a.'.'.$index_b;
-    $descr = $entry['temperatureProbeLocationName'];
-
-    if (isset($entry['temperatureProbeReading']))
-    {
-      $oid = ".1.3.6.1.4.1.674.10892.5.4.700.20.1.6.$index";
-      $options = array();
-
-      if (isset($entry['temperatureProbeLowerNonCriticalThreshold'])) { $options['warn_low']   = $entry['temperatureProbeLowerNonCriticalThreshold']; }
-      if (isset($entry['temperatureProbeLowerCriticalThreshold']))    { $options['limit_low']  = $entry['temperatureProbeLowerCriticalThreshold']; }
-      if (isset($entry['temperatureProbeUpperNonCriticalThreshold'])) { $options['warn_high']  = $entry['temperatureProbeUpperNonCriticalThreshold']; }
-      if (isset($entry['temperatureProbeUpperCriticalThreshold']))    { $options['limit_high'] = $entry['temperatureProbeUpperCriticalThreshold']; }
-
-      discover_sensor('temperature', $device, $oid, $index, 'temperatureProbeReading', $descr, 0.1, $entry['temperatureProbeReading'], $options);
-    }
-
-  }
-}
-
-/**
-
-IDRAC-MIB::voltageProbechassisIndex.1.3 = INTEGER: 1
-IDRAC-MIB::voltageProbeIndex.1.3 = INTEGER: 3
-IDRAC-MIB::voltageProbeStateCapabilities.1.3 = INTEGER: 0
-IDRAC-MIB::voltageProbeStateSettings.1.3 = INTEGER: enabled(2)
-IDRAC-MIB::voltageProbeStatus.1.3 = INTEGER: ok(3)
-IDRAC-MIB::voltageProbeType.1.3 = INTEGER: voltageProbeTypeIsDiscrete(16)
-IDRAC-MIB::voltageProbeLocationName.1.3 = STRING: "System Board 3.3V PG"
-IDRAC-MIB::voltageProbeProbeCapabilities.1.3 = INTEGER: 0
-IDRAC-MIB::voltageProbeDiscreteReading.1.3 = INTEGER: voltageIsGood(1)
-
-**/
-
-$oids = array ('voltageProbeStatus', 'voltageProbeReading', 'temperatureProbeLocationName', 'temperatureProbeUpperCriticalThreshold', 'temperatureProbeUpperNonCriticalThreshold', 'temperatureProbeLowerNonCriticalThreshold', 'temperatureProbeLowerCriticalThreshold');
-
-$data = array();
-foreach ($oids as $oid)
-{
-  $data = snmpwalk_cache_twopart_oid($device, $oid, $data, 'IDRAC-MIB-SMIv2');
-}
-
-foreach ($data as $index_a => $entries)
-{
-  foreach ($entries as $index_b => $entry)
-  {
-    $index = $index_a.'.'.$index_b;
-    $descr = $entry['voltageProbeLocationName'];
-  }
-}
-
-// EOF
