feature: Improve Dell OpenManage Discovery #4957

Merged
merged 2 commits into from Nov 9, 2016

Projects

None yet

4 participants

@Rosiak
Contributor
Rosiak commented Nov 8, 2016 edited

Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.

screen shot 2016-11-08 at 22 45 45

Rosiak added some commits Nov 8, 2016
@Rosiak Rosiak feature: Improve Dell OpenManage Discovery 06cba65
@Rosiak Rosiak style fixes and state add
93e582f
@scrutinizer-notifier

The inspection completed: No new issues

- $low_limit = snmp_get($device, $limit_oid, '-Oqv', 'MIB-Dell-10892');
- $divisor = '1';
- discover_sensor($valid['sensor'], 'fanspeed', $device, $fan_oid, $index, 'dell', $descr, $divisor, '1', $low_limit, null, null, null, $current);
+ discover_sensor($valid['sensor'], 'fanspeed', $device, $cur_oid . $index, $index, 'dell', $descr, '0', '1', $lowlimit, $low_warn_limit, $warnlimit, $limit, $value, 'snmp', $index);
@laf
laf Nov 9, 2016 Member

Does the OID change here as before we had .1.3.6.1.4.1.674.10892.1.700.12.1.6.1. + the index now we have .1.3.6.1.4.1.674.10892.1.700.12.1.6. + the index.

@Rosiak
Rosiak Nov 9, 2016 Contributor

Nope OID stays the same.

@laf
laf Nov 9, 2016 Member

Are you sure because the above seems to suggest it will change as the OID's used vary slightly

@Rosiak
Rosiak Nov 9, 2016 Contributor

laf: Pretty sure.

coolingDeviceIndex.1.1 = 1
coolingDeviceIndex.1.2 = 2
coolingDeviceIndex.1.3 = 3
coolingDeviceIndex.1.4 = 4
coolingDeviceIndex.1.5 = 5
coolingDeviceIndex.1.6 = 6
coolingDeviceIndex.1.7 = 7
coolingDeviceIndex.1.8 = 8
coolingDeviceIndex.1.9 = 9
coolingDeviceIndex.1.10 = 10
coolingDeviceIndex.1.11 = 11
coolingDeviceIndex.1.12 = 12

Discover sensor: .1.3.6.1.4.1.674.10892.1.700.12.1.6.1.1, 1.1, dell, System Board FAN MOD 1A RPM, snmp, , 1.1
SQL[SELECT COUNT(sensor_id) FROM `sensors` WHERE `poller_type`= 'snmp' AND `sensor_class` = 'fanspeed' AND `device_id` = '31' AND sensor_type = 'dell' AND `sensor_index` = '1.1'] 
SQL[SELECT * FROM `sensors` WHERE `sensor_class` = 'fanspeed' AND `device_id` = '31' AND `sensor_type` = 'dell' AND `sensor_index` = '1.1'] 
.Discover sensor: .1.3.6.1.4.1.674.10892.1.700.12.1.6.1.2, 1.2, dell, System Board FAN MOD 2A RPM, snmp, , 1.2
SQL[SELECT COUNT(sensor_id) FROM `sensors` WHERE `poller_type`= 'snmp' AND `sensor_class` = 'fanspeed' AND `device_id` = '31' AND sensor_type = 'dell' AND `sensor_index` = '1.2'] 
SQL[SELECT * FROM `sensors` WHERE `sensor_class` = 'fanspeed' AND `device_id` = '31' AND `sensor_type` = 'dell' AND `sensor_index` = '1.2'] 
.Discover sensor: .1.3.6.1.4.1.674.10892.1.700.12.1.6.1.3, 1.3, dell, System Board FAN MOD 3A RPM, snmp, , 1.3
SQL[SELECT COUNT(sensor_id) FROM `sensors` WHERE `poller_type`= 'snmp' AND `sensor_class` = 'fanspeed' AND `device_id` = '31' AND sensor_type = 'dell' AND `sensor_index` = '1.3'] 
SQL[SELECT * FROM `sensors` WHERE `sensor_class` = 'fanspeed' AND `device_id` = '31' AND `sensor_type` = 'dell' AND `sensor_index` = '1.3'] 
.Discover sensor: .1.3.6.1.4.1.674.10892.1.700.12.1.6.1.4, 1.4, dell, System Board FAN MOD 4A RPM, snmp, , 1.4
SQL[SELECT COUNT(sensor_id) FROM `sensors` WHERE `poller_type`= 'snmp' AND `sensor_class` = 'fanspeed' AND `device_id` = '31' AND sensor_type = 'dell' AND `sensor_index` = '1.4'] 
SQL[SELECT * FROM `sensors` WHERE `sensor_class` = 'fanspeed' AND `device_id` = '31' AND `sensor_type` = 'dell' AND `sensor_index` = '1.4'] 
.Discover sensor: .1.3.6.1.4.1.674.10892.1.700.12.1.6.1.5, 1.5, dell, System Board FAN MOD 5A RPM, snmp, , 1.5
SQL[SELECT COUNT(sensor_id) FROM `sensors` WHERE `poller_type`= 'snmp' AND `sensor_class` = 'fanspeed' AND `device_id` = '31' AND sensor_type = 'dell' AND `sensor_index` = '1.5'] 
SQL[SELECT * FROM `sensors` WHERE `sensor_class` = 'fanspeed' AND `device_id` = '31' AND `sensor_type` = 'dell' AND `sensor_index` = '1.5'] 
.Discover sensor: .1.3.6.1.4.1.674.10892.1.700.12.1.6.1.6, 1.6, dell, System Board FAN MOD 6A RPM, snmp, , 1.6
SQL[SELECT COUNT(sensor_id) FROM `sensors` WHERE `poller_type`= 'snmp' AND `sensor_class` = 'fanspeed' AND `device_id` = '31' AND sensor_type = 'dell' AND `sensor_index` = '1.6'] 
SQL[SELECT * FROM `sensors` WHERE `sensor_class` = 'fanspeed' AND `device_id` = '31' AND `sensor_type` = 'dell' AND `sensor_index` = '1.6'] 
.Discover sensor: .1.3.6.1.4.1.674.10892.1.700.12.1.6.1.7, 1.7, dell, System Board FAN MOD 1B RPM, snmp, , 1.7
SQL[SELECT COUNT(sensor_id) FROM `sensors` WHERE `poller_type`= 'snmp' AND `sensor_class` = 'fanspeed' AND `device_id` = '31' AND sensor_type = 'dell' AND `sensor_index` = '1.7'] 
SQL[SELECT * FROM `sensors` WHERE `sensor_class` = 'fanspeed' AND `device_id` = '31' AND `sensor_type` = 'dell' AND `sensor_index` = '1.7'] 
.Discover sensor: .1.3.6.1.4.1.674.10892.1.700.12.1.6.1.8, 1.8, dell, System Board FAN MOD 2B RPM, snmp, , 1.8
SQL[SELECT COUNT(sensor_id) FROM `sensors` WHERE `poller_type`= 'snmp' AND `sensor_class` = 'fanspeed' AND `device_id` = '31' AND sensor_type = 'dell' AND `sensor_index` = '1.8'] 
SQL[SELECT * FROM `sensors` WHERE `sensor_class` = 'fanspeed' AND `device_id` = '31' AND `sensor_type` = 'dell' AND `sensor_index` = '1.8'] 
.Discover sensor: .1.3.6.1.4.1.674.10892.1.700.12.1.6.1.9, 1.9, dell, System Board FAN MOD 3B RPM, snmp, , 1.9
SQL[SELECT COUNT(sensor_id) FROM `sensors` WHERE `poller_type`= 'snmp' AND `sensor_class` = 'fanspeed' AND `device_id` = '31' AND sensor_type = 'dell' AND `sensor_index` = '1.9'] 
SQL[SELECT * FROM `sensors` WHERE `sensor_class` = 'fanspeed' AND `device_id` = '31' AND `sensor_type` = 'dell' AND `sensor_index` = '1.9'] 
.Discover sensor: .1.3.6.1.4.1.674.10892.1.700.12.1.6.1.10, 1.10, dell, System Board FAN MOD 4B RPM, snmp, , 1.10
SQL[SELECT COUNT(sensor_id) FROM `sensors` WHERE `poller_type`= 'snmp' AND `sensor_class` = 'fanspeed' AND `device_id` = '31' AND sensor_type = 'dell' AND `sensor_index` = '1.10'] 
SQL[SELECT * FROM `sensors` WHERE `sensor_class` = 'fanspeed' AND `device_id` = '31' AND `sensor_type` = 'dell' AND `sensor_index` = '1.10'] 
.Discover sensor: .1.3.6.1.4.1.674.10892.1.700.12.1.6.1.11, 1.11, dell, System Board FAN MOD 5B RPM, snmp, , 1.11
SQL[SELECT COUNT(sensor_id) FROM `sensors` WHERE `poller_type`= 'snmp' AND `sensor_class` = 'fanspeed' AND `device_id` = '31' AND sensor_type = 'dell' AND `sensor_index` = '1.11'] 
SQL[SELECT * FROM `sensors` WHERE `sensor_class` = 'fanspeed' AND `device_id` = '31' AND `sensor_type` = 'dell' AND `sensor_index` = '1.11'] 
.Discover sensor: .1.3.6.1.4.1.674.10892.1.700.12.1.6.1.12, 1.12, dell, System Board FAN MOD 6B RPM, snmp, , 1.12
SQL[SELECT COUNT(sensor_id) FROM `sensors` WHERE `poller_type`= 'snmp' AND `sensor_class` = 'fanspeed' AND `device_id` = '31' AND sensor_type = 'dell' AND `sensor_index` = '1.12'] 
SQL[SELECT * FROM `sensors` WHERE `sensor_class` = 'fanspeed' AND `device_id` = '31' AND `sensor_type` = 'dell' AND `sensor_index` = '1.12'] 
+ $descr = clean($temp[$index][$tablevalue[3]]); // Use clean as virtualDiskDeviceName is user defined
+ }
+ //Discover Sensors
+ discover_sensor($valid['sensor'], 'state', $device, $cur_oid.$index, $index, $state_name, $descr, '1', '1', null, null, null, null, $temp[$index][$tablevalue[2]], 'snmp', $index);
@laf
laf Nov 9, 2016 Member

Do any of the OID's change here?

@Rosiak
Rosiak Nov 9, 2016 Contributor

Nope OID stays the same.

- }//end if
- }//end foreach
-}//end if
+ discover_sensor($valid['sensor'], 'temperature', $device, $cur_oid . $index, $index, 'dell', $descr, $divisor, '1', $lowlimit, $low_warn_limit, $warnlimit, $limit, $value, 'snmp', $index);
@laf
laf Nov 9, 2016 Member

Same here.

@Rosiak
Rosiak Nov 9, 2016 Contributor

Nope OID stays the same.

@laf laf merged commit 00495ce into librenms:master Nov 9, 2016

2 checks passed

Auto-Deploy Build finished.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@Rosiak Rosiak deleted the Rosiak:dell-openmanage branch Feb 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment