Recently we have updated from 1.48.1 to 1.51. As soon as upgrade has finished and first scheduled discovery broke out, we started facing an issue for all of our Dell iDRAC devices.
In includes/discovery/sensors/state/drac.inc.php there is:
if ($value_oid == 'virtualDiskState') {
$states = [
['value' => 1, 'generic' => 3, 'graph' => 0, 'descr' => 'unknown'],
['value' => 2, 'generic' => 0, 'graph' => 0, 'descr' => 'online'],
['value' => 3, 'generic' => 2, 'graph' => 0, 'descr' => 'failed'],
['value' => 4, 'generic' => 1, 'graph' => 0, 'descr' => 'degraded'],
];
}
In includes/discovery/sensors/state/dell.inc.php there is:
elseif ($state_name == 'virtualDiskState') {
$states = [
['value' => 0, 'generic' => 3, 'graph' => 0, 'descr' => 'unknown'],
['value' => 1, 'generic' => 0, 'graph' => 1, 'descr' => 'ready'],
['value' => 2, 'generic' => 2, 'graph' => 1, 'descr' => 'failed'],
['value' => 3, 'generic' => 1, 'graph' => 1, 'descr' => 'online'],
['value' => 4, 'generic' => 2, 'graph' => 1, 'descr' => 'offline'],
['value' => 6, 'generic' => 2, 'graph' => 1, 'descr' => 'degraded'],
['value' => 7, 'generic' => 1, 'graph' => 1, 'descr' => 'verifying'],
['value' => 15, 'generic' => 1, 'graph' => 1, 'descr' => 'resynching'],
['value' => 16, 'generic' => 1, 'graph' => 1, 'descr' => 'regenerating'],
['value' => 18, 'generic' => 2, 'graph' => 1, 'descr' => 'failedRedundancy'],
['value' => 24, 'generic' => 1, 'graph' => 1, 'descr' => 'rebuilding'],
['value' => 26, 'generic' => 1, 'graph' => 1, 'descr' => 'formatting'],
['value' => 32, 'generic' => 1, 'graph' => 1, 'descr' => 'reconstructing'],
['value' => 35, 'generic' => 1, 'graph' => 1, 'descr' => 'initializing'],
['value' => 36, 'generic' => 1, 'graph' => 1, 'descr' => 'backgroundInit'],
['value' => 52, 'generic' => 2, 'graph' => 1, 'descr' => 'permanentlyDegraded'],
];
}
Specifically, failed/online states use different numbered represenations (also as per MIBs, so no offence here).
So after an upgrade, as soon as discovery runs through, every virtual disk will go to failed state.
The following patch solves an issue:
--- dell_old.inc.php 2019-05-24 15:44:51.323010700 +0300
+++ dell.inc.php 2019-05-24 15:45:11.233443600 +0300
@@ -18,7 +18,6 @@
['intrusionTable','.1.3.6.1.4.1.674.10892.1.300.70.1.5.','intrusionStatus','Intrusion','MIB-Dell-10892'],
['controllerTable','.1.3.6.1.4.1.674.10893.1.20.130.1.1.5.','controllerState','controllerName','StorageManagement-MIB'],
['arrayDiskTable','.1.3.6.1.4.1.674.10893.1.20.130.4.1.4.','arrayDiskState','arrayDiskName','StorageManagement-MIB'],
- ['virtualDiskTable','.1.3.6.1.4.1.674.10893.1.20.140.1.1.4.','virtualDiskState','virtualDiskDeviceName','StorageManagement-MIB'],
['batteryTable','.1.3.6.1.4.1.674.10893.1.20.130.15.1.4.','batteryState','batteryName','StorageManagement-MIB'],
];
@@ -72,25 +71,6 @@
['value' => 22, 'generic' => 2, 'graph' => 0, 'descr' => 'incompatible'],
['value' => 23, 'generic' => 2, 'graph' => 0, 'descr' => 'readOnly'],
];
- } elseif ($state_name == 'virtualDiskState') {
- $states = [
- ['value' => 0, 'generic' => 3, 'graph' => 0, 'descr' => 'unknown'],
- ['value' => 1, 'generic' => 0, 'graph' => 1, 'descr' => 'ready'],
- ['value' => 2, 'generic' => 2, 'graph' => 1, 'descr' => 'failed'],
- ['value' => 3, 'generic' => 1, 'graph' => 1, 'descr' => 'online'],
- ['value' => 4, 'generic' => 2, 'graph' => 1, 'descr' => 'offline'],
- ['value' => 6, 'generic' => 2, 'graph' => 1, 'descr' => 'degraded'],
- ['value' => 7, 'generic' => 1, 'graph' => 1, 'descr' => 'verifying'],
- ['value' => 15, 'generic' => 1, 'graph' => 1, 'descr' => 'resynching'],
- ['value' => 16, 'generic' => 1, 'graph' => 1, 'descr' => 'regenerating'],
- ['value' => 18, 'generic' => 2, 'graph' => 1, 'descr' => 'failedRedundancy'],
- ['value' => 24, 'generic' => 1, 'graph' => 1, 'descr' => 'rebuilding'],
- ['value' => 26, 'generic' => 1, 'graph' => 1, 'descr' => 'formatting'],
- ['value' => 32, 'generic' => 1, 'graph' => 1, 'descr' => 'reconstructing'],
- ['value' => 35, 'generic' => 1, 'graph' => 1, 'descr' => 'initializing'],
- ['value' => 36, 'generic' => 1, 'graph' => 1, 'descr' => 'backgroundInit'],
- ['value' => 52, 'generic' => 2, 'graph' => 1, 'descr' => 'permanentlyDegraded'],
- ];
} elseif ($state_name == 'batteryState') {
$states = [
['value' => 1, 'generic' => 0, 'graph' => 0, 'descr' => 'ready'],
Unfortunately, I could not find a way to resolve this in code. iDRAC devices contain sensors from both DRAC and DELL MIBS, so there is no point in dropping DELL MIBS for DRAC devices. So there should be another approach used, which I could not figure out…