Index: includes/definitions/mibs/dell.inc.php
===================================================================
--- includes/definitions/mibs/dell.inc.php	(revision 10258)
+++ includes/definitions/mibs/dell.inc.php	(working copy)
@@ -331,6 +331,9 @@
 $config['mibs'][$mib]['mib_dir'] = 'dell';
 $config['mibs'][$mib]['descr'] = '';
 
+
+
+
 $mib = 'MIB-Dell-10892';
 $config['mibs'][$mib]['enable'] = 1;
 $config['mibs'][$mib]['identity_num'] = '.1.3.6.1.4.1.674.10892.1';
@@ -361,6 +364,48 @@
 $config['mibs'][$mib]['states'][$type][6] = array('name' => 'nonRecoverable', 'event' => 'alert');   // status of the object is non-recoverable (dead)
 $config['mibs'][$mib]['states'][$type][7] = array('name' => 'absent',         'event' => 'ignore');  // status of object is absent
 
+$config['mibs'][$mib]['status'][] = array(
+//  'table'               => '',
+  'oid'                 => 'systemStateGlobalSystemStatus',
+  'oid_num'							=> '.1.3.6.1.4.1.674.10892.1.200.10.1.2',
+  'descr'               => 'Global system status',
+  'measured'            => 'Device',
+  'type'                => 'DellStatus',
+);
+
+$config['mibs'][$mib]['status'][] = array(
+//  'table'               => '',
+  'oid'                 => 'systemStateChassisStatus',
+  'descr'               => 'Global Chassie status',
+  'measured'            => 'Device',
+  'type'                => 'DellStatus',
+);
+$config['mibs'][$mib]['status'][] = array(
+//  'table'               => '',
+  'oid'                 => 'systemStateMemoryDeviceStatusCombined',
+  'descr'               => 'Global Memory status',
+  'measured'            => 'Device',
+  'type'                => 'DellStatus',
+);
+
+$config['mibs'][$mib]['status'][] = array(
+//  'table'               => '',
+  'oid'                 => 'systemStateBatteryStatusCombined',
+  'descr'               => 'Global Battery status',
+  'measured'            => 'Device',
+  'type'                => 'DellStatus',
+);
+
+$config['mibs'][$mib]['status'][] = array(
+//  'table'               => '',
+  'oid'                 => 'systemStateSDCardDeviceStatusCombined',
+  'descr'               => 'Global SD-card status',
+  'measured'            => 'Device',
+  'type'                => 'DellStatus',
+);
+
+
+
 # MIB-Dell-10892::temperatureProbechassisIndex.1.1 = INTEGER: 1
 # MIB-Dell-10892::temperatureProbeIndex.1.1 = INTEGER: 1
 # MIB-Dell-10892::temperatureProbeStateCapabilities.1.1 = INTEGER: 0
@@ -378,6 +423,7 @@
 $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.1.700.20.1.6',
@@ -415,6 +461,8 @@
 $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.1.600.20.1.6',
@@ -427,6 +475,26 @@
   'test'                => [ 'field' => 'voltageProbeStateSettings', 'operator' => 'eq', 'value' => 'enabled' ],
 );
 
+$config['mibs'][$mib]['status'][] = array(
+  'oid'                 => 'voltageProbeDiscreteReading',
+  'descr'               => 'Voltage %voltageProbeLocationName%',
+  'oid_extra'           => ['voltageProbeType', 'voltageProbeLocationName'],
+  'measured'            => 'Voltage',
+  'type'                => 'DellVoltageDiscreteReading',
+
+  'test'                => [ 'field' => 'voltageProbeType', 'operator' => 'eq', 'value' => 'voltageProbeTypeIsDiscrete' ],
+);
+
+$type = 'DellVoltageDiscreteReading';
+$config['mibs'][$mib]['states'][$type][0] = array('name' => 'unknown',  'event' => 'exclude');
+$config['mibs'][$mib]['states'][$type][1] = array('name' => 'voltageIsGood',  'event' => 'ok');
+$config['mibs'][$mib]['states'][$type][2] = array('name' => 'voltageIsBad',   'event' => 'alert');
+
+
+
+/*
+
+
 # MIB-Dell-10892::coolingDevicechassisIndex.1.1 = INTEGER: 1
 # MIB-Dell-10892::coolingDeviceIndex.1.1 = INTEGER: 1
 # MIB-Dell-10892::coolingDeviceStateCapabilities.1.1 = INTEGER: 0
@@ -441,11 +509,13 @@
 # MIB-Dell-10892::coolingDeviceLowerCriticalThreshold.1.1 = INTEGER: 3720
 # MIB-Dell-10892::coolingDeviceSubType.1.1 = INTEGER: coolingDeviceSubTypeIsAFanThatReadsInRPM(3)
 # MIB-Dell-10892::coolingDeviceProbeCapabilities.1.1 = INTEGER: 15
+*/
 
 $config['mibs'][$mib]['sensor'][] = array(
   'oid'                 => 'coolingDeviceReading',
   'oid_descr'           => 'coolingDeviceLocationName',
-  'oid_extra'           => 'coolingDeviceStateSettings',
+  'descr_transform'     => [ 'action' => 'replace', 'from' => [ ' (unknown)','RPM', ' Sys ' ], 'to' => [ '', '', ' ' ] ],
+  'oid_extra'           => ['coolingDeviceLocationName', 'coolingDeviceStateSettings'],
   'class'               => 'fanspeed',
   'oid_num'             => '.1.3.6.1.4.1.674.10892.1.700.12.1.6',
   'oid_limit_high'      => 'coolingDeviceUpperCriticalThreshold',
@@ -515,6 +585,7 @@
 $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.1.600.12.1.5',
@@ -522,6 +593,40 @@
   'test'                => [ 'field' => 'powerSupplyStateSettingsUnique', 'operator' => 'ne', 'value' => 0 ],
 );
 
+
+$config['mibs'][$mib]['sensor'][] = array(
+  'tabel'               => 'AmperageProbeTableEntry',
+  'oid'                 => 'amperageProbeReading',
+  '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'           => [ 'amperageProbeTypeIsSystemWatts' => 1,  'amperageProbeTypeIsPowerSupplyAmps' => '0.1' ],
+
+  'oid_limit_high'      => 'amperageProbeUpperCriticalThreshold',
+  'oid_limit_high_warn' => 'amperageProbeUpperNonCriticalThreshold',
+//  'test'                => [ 'field' => 'coolingDeviceStateSettings', 'operator' => 'eq', 'value' => 'enabled' ],
+//  'rename_rrd'          => 'dell-%index%'
+);
+
+/////////// CMOS battery
+
+$config['mibs'][$mib]['status'][] = array(
+  'oid'                 => 'batteryReading',
+  'oid_descr'           => 'batteryLocationName',
+//  'oid_extra'           => 'powerSupplyStateSettingsUnique',
+  '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 = 'ArrayManager-MIB';
 $config['mibs'][$mib]['enable'] = 1;
 $config['mibs'][$mib]['identity_num'] = '.1.3.6.1.4.1.674.10893.1';
@@ -645,4 +750,197 @@
 $config['mibs'][$mib]['states'][$type][7] = array('name' => 'lowerLayerDown', 'event' => 'alert');
 $config['mibs'][$mib]['states'][$type][8] = array('name' => 'failed',         'event' => 'alert');
 
+
+////// StorageManagement-MIB       //////////////777
+
+$mib = 'StorageManagement-MIB';
+$config['mibs'][$mib]['enable'] = 1;
+$config['mibs'][$mib]['identity_num'] = '.1.3.6.1.4.1.674.10893.1.20';
+$config['mibs'][$mib]['mib_dir'] = 'dell';
+$config['mibs'][$mib]['descr'] = '';
+
+$config['mibs'][$mib]['discovery'][] = [
+  'os_group' => 'unix', 'os' => 'windows', // device params compared with "or"
+  'StorageManagement-MIB::softwareVersion.0' => '/.+/' //not empty
+];
+
+$config['mibs'][$mib]['status'][] = array(
+//  'table'               => '',
+  'oid'                 => 'agentGlobalSystemStatus',
+  'descr'               => 'Global storage system',
+  'measured'            => 'Device',
+  'type'                => 'DellStatus',
+);
+
+$type = 'DellStatus';
+$config['mibs'][$mib]['states'][$type][1] = array('name' => 'other',          'event' => 'exclude'); // the status of the object is not one of the following:
+$config['mibs'][$mib]['states'][$type][2] = array('name' => 'unknown',        'event' => 'ignore');  // the status of the object is unknown (not known or monitored)
+$config['mibs'][$mib]['states'][$type][3] = array('name' => 'ok',             'event' => 'ok');      // the status of the object is ok
+$config['mibs'][$mib]['states'][$type][4] = array('name' => 'nonCritical',    'event' => 'warning'); // the status of the object is warning, non-critical
+$config['mibs'][$mib]['states'][$type][5] = array('name' => 'critical',       'event' => 'alert');   // the status of the object is critical (failure)
+$config['mibs'][$mib]['states'][$type][6] = array('name' => 'nonRecoverable', 'event' => 'alert');   // the status of the object is non-recoverable (dead)
+
+$config['mibs'][$mib]['status'][] = array(
+  'table'               => 'controllerEntry',
+  'oid'                 => 'controllerState',
+  'descr'               => '%controllerName% (%controllerFWVersion%), #%controllerNumber% (%controllerType%)',
+  'descr_transform' => [ 'action' => 'replace',
+                         'from' => [ '()' ],
+                         'to' => [ ''    ] ],
+
+  'measured'            => 'controller',
+  'type'                => 'controllerState',
+);
+
+$type = 'controllerState';
+$config['mibs'][$mib]['states'][$type][0] = array('name' => 'unknown',  'event' => 'exclude');
+$config['mibs'][$mib]['states'][$type][1] = array('name' => 'ready',    'event' => 'ok');
+$config['mibs'][$mib]['states'][$type][2] = array('name' => 'failed',   'event' => 'alert');
+$config['mibs'][$mib]['states'][$type][3] = array('name' => 'online',   'event' => 'ok');
+$config['mibs'][$mib]['states'][$type][4] = array('name' => 'offline',  'event' => 'alert');
+$config['mibs'][$mib]['states'][$type][6] = array('name' => 'degraded', 'event' => 'warning');
+
+
+/////////////         Virtual DRIVE VD
+
+
+$config['mibs'][$mib]['status'][] = array(
+  'table'               => 'VirtualDiskEntry',
+  'oid'                 => 'virtualDiskState',
+  'descr'               => 'Virtual Drive %virtualDiskNumber% (%virtualDiskLayout%, %virtualDiskLengthInMB%MB)',
+                               //  Can Observium do math?
+  'measured'            => 'logicalDrive',
+  'type'                => 'virtualDiskState',
+);
+
+$type = 'virtualDiskState';
+$config['mibs'][$mib]['states'][$type][0] = array('name' => 'unknown',  'event' => 'exclude');
+$config['mibs'][$mib]['states'][$type][1] = array('name' => 'ready',    'event' => 'ok');
+$config['mibs'][$mib]['states'][$type][2] = array('name' => 'failed',   'event' => 'alert');
+$config['mibs'][$mib]['states'][$type][3] = array('name' => 'online',   'event' => 'ok');
+$config['mibs'][$mib]['states'][$type][4] = array('name' => 'offline',  'event' => 'alert');
+$config['mibs'][$mib]['states'][$type][6] = array('name' => 'degraded', 'event' => 'warning');
+$config['mibs'][$mib]['states'][$type][7] = array('name' => 'verifying', 'event' => 'warning');
+$config['mibs'][$mib]['states'][$type][15] = array('name' => 'resynching', 'event' => 'warning');
+$config['mibs'][$mib]['states'][$type][16] = array('name' => 'regenerating', 'event' => 'warning');
+$config['mibs'][$mib]['states'][$type][18] = array('name' => 'failedRedundancy', 'event' => 'alert');
+$config['mibs'][$mib]['states'][$type][24] = array('name' => 'rebuilding', 'event' => 'warning');
+$config['mibs'][$mib]['states'][$type][26] = array('name' => 'formatting',         'event' => 'ok');
+$config['mibs'][$mib]['states'][$type][32] = array('name' => 'reconstructing',      'event' => 'warning');
+$config['mibs'][$mib]['states'][$type][35] = array('name' => 'initializing',       'event' => 'ok');
+$config['mibs'][$mib]['states'][$type][36] = array('name' => 'backgroundInit',      'event' => 'ok');
+$config['mibs'][$mib]['states'][$type][52] = array('name' => 'permanentlyDegraded', 'event' => 'alert');
+
+$config['mibs'][$mib]['status'][] = array(
+  'table'               => 'ArrayDiskEntry',
+  'oid'                 => 'arrayDiskState',
+  'descr'               => 'Disk %arrayDiskName% (%arrayDiskVendor% %arrayDiskProductID%, %arrayDiskSerialNo%) state',
+  'descr_transform' => [ 'action' => 'replace',
+                      'from' => [ '(tm)', 'Physical Disk' ],
+                        'to' => [ '',  ''    ] ],
+
+  'measured'            => 'physicalDrive',
+  'type'                => 'arrayDiskState',
+  'test'                => [ 'field' => 'arrayDiskProductID', 'operator' => 'notmatch', 'value' => '*DVD*' ],
+);
+
+
+$type = 'arrayDiskState';
+$config['mibs'][$mib]['states'][$type][0] = array('name' => 'unknown',  'event' => 'exclude');
+$config['mibs'][$mib]['states'][$type][1] = array('name' => 'ready',    'event' => 'ok');
+$config['mibs'][$mib]['states'][$type][2] = array('name' => 'failed',   'event' => 'alert');
+$config['mibs'][$mib]['states'][$type][3] = array('name' => 'online',   'event' => 'ok');
+$config['mibs'][$mib]['states'][$type][4] = array('name' => 'offline',  'event' => 'alert');
+$config['mibs'][$mib]['states'][$type][6] = array('name' => 'degraded', 'event' => 'warning');
+$config['mibs'][$mib]['states'][$type][7] = array('name' => 'verifying', 'event' => 'warning');
+$config['mibs'][$mib]['states'][$type][11] = array('name' => 'removed', 'event' => 'ignored');
+$config['mibs'][$mib]['states'][$type][13] = array('name' => 'non-raid', 'event' => 'ok');
+$config['mibs'][$mib]['states'][$type][14] = array('name' => 'notReady', 'event' => 'warning');
+$config['mibs'][$mib]['states'][$type][15] = array('name' => 'resynching', 'event' => 'warning');
+$config['mibs'][$mib]['states'][$type][22] = array('name' => 'replacing', 'event' => 'warning');
+$config['mibs'][$mib]['states'][$type][23] = array('name' => 'spinningDown', 'event' => 'warning');
+$config['mibs'][$mib]['states'][$type][24] = array('name' => 'rebuild', 'event' => 'warning');
+$config['mibs'][$mib]['states'][$type][25] = array('name' => 'noMedia', 'event' => 'warning');
+$config['mibs'][$mib]['states'][$type][26] = array('name' => 'formatting', 'event' => 'ok');
+$config['mibs'][$mib]['states'][$type][28] = array('name' => 'diagnostics', 'event' => 'warning');
+$config['mibs'][$mib]['states'][$type][34] = array('name' => 'predictiveFailure', 'event' => 'alert');
+$config['mibs'][$mib]['states'][$type][35] = array('name' => 'initializing',       'event' => 'ok');
+$config['mibs'][$mib]['states'][$type][39] = array('name' => 'foreign',       'event' => 'warning');
+$config['mibs'][$mib]['states'][$type][40] = array('name' => 'clear',       'event' => 'ok');
+$config['mibs'][$mib]['states'][$type][41] = array('name' => 'unsupported',       'event' => 'warning');
+$config['mibs'][$mib]['states'][$type][53] = array('name' => 'incompatible',       'event' => 'warning');
+$config['mibs'][$mib]['states'][$type][56] = array('name' => 'readOnly',       'event' => 'warning');
+
+$config['mibs'][$mib]['status'][] = array(
+  'table'               => 'ArrayDiskEntry',
+  'oid'                 => 'arrayDiskSmartAlertIndication',
+  'descr'               => 'Disk %arrayDiskName% (%arrayDiskVendor% %arrayDiskProductID%, %arrayDiskSerialNo%) SmartAlert',
+  'descr_transform' => [ 'action' => 'replace',
+                      'from' => [ '(tm)', 'Physical Disk' ],
+                        'to' => [ '',  ''    ] ],
+  'measured'            => 'physicalDrive',
+  'type'                => 'Smartstatus',
+  'test'                => [ 'field' => 'arrayDiskProductID', 'operator' => 'notmatch', 'value' => '*DVD*' ],
+);
+
+
+$type = 'Smartstatus';
+$config['mibs'][$mib]['states'][$type][0] = array('name' => 'unknown',  'event' => 'exclude');
+$config['mibs'][$mib]['states'][$type][1] = array('name' => 'no',    'event' => 'ok');
+$config['mibs'][$mib]['states'][$type][2] = array('name' => 'yes',   'event' => 'alert');
+
+$config['mibs'][$mib]['sensor'][] = array(
+  'table'                => 'arrayDiskEntry',
+  'oid'                 => 'arrayDiskRemainingRatedWriteEndurance', // Number of disk devices in this adapter that are critical
+  'descr'               => 'Disk %arrayDiskName% (%arrayDiskVendor% %arrayDiskProductID%, %arrayDiskSerialNo%) Remain Write',
+  'descr_transform' => [ 'action' => 'replace',
+                      'from' => [ '(tm)', 'Physical Disk' ],
+                        'to' => [ '',  ''    ] ],
+  'class'               => 'capacity',
+  'limit_low_warn'     => 25,
+  'limit_low'          => 10
+);
+
+
+///////////////  Battery status
+
+$config['mibs'][$mib]['status'][] = array(
+  'table'               => 'batteryEntry',
+  'oid'                 => 'batteryState',
+  'oid_extra'           => 'batteryConnectionControllerNumber',
+  'oid_extra'           => [ 'batteryConnectionControllerName' ],
+  'descr'               => '%batteryConnectionControllerName% %batteryName% State',
+  'measured'            => 'controller',
+  'type'                => 'BTstate',
+);
+
+
+$type = 'BTstate';
+$config['mibs'][$mib]['states'][$type][0] = array('name' => 'unknown',  'event' => 'exclude');
+$config['mibs'][$mib]['states'][$type][1] = array('name' => 'ready',    'event' => 'ok');
+$config['mibs'][$mib]['states'][$type][2] = array('name' => 'failed',   'event' => 'alert');
+$config['mibs'][$mib]['states'][$type][6] = array('name' => 'degraded', 'event' => 'warning');
+$config['mibs'][$mib]['states'][$type][7] = array('name' => 'reconditioning', 'event' => 'warning');
+$config['mibs'][$mib]['states'][$type][9] = array('name' => 'high', 'event' => 'warning');
+$config['mibs'][$mib]['states'][$type][10] = array('name' => 'low', 'event' => 'warning');
+$config['mibs'][$mib]['states'][$type][12] = array('name' => 'charging', 'event' => 'ok');
+$config['mibs'][$mib]['states'][$type][21] = array('name' => 'missing', 'event' => 'warning');
+$config['mibs'][$mib]['states'][$type][36] = array('name' => 'learning', 'event' => 'ok');
+
+$config['mibs'][$mib]['status'][] = array(
+  'table'               => 'batteryEntry',
+  'oid'                 => 'batteryPredictedCapacity',
+  'oid_extra'           => 'batteryConnectionControllerNumber', 
+  'oid_extra'           => [ 'batteryConnectionControllerName' ],
+  'descr'               => '%batteryConnectionControllerName% %batteryName% Capacity',
+  'measured'            => 'controller',
+  'type'                => 'BTcapacity',
+);
+
+$type = 'BTcapacity';
+$config['mibs'][$mib]['states'][$type][0] = array('name' => 'unknown',  'event' => 'exclude');
+$config['mibs'][$mib]['states'][$type][1] = array('name' => 'failed',   'event' => 'alert');
+$config['mibs'][$mib]['states'][$type][2] = array('name' => 'ready',    'event' => 'ok');
+$config['mibs'][$mib]['states'][$type][4] = array('name' => 'unknown',  'event' => 'exclude');
+