mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Move SNMP query
This commit is contained in:
@@ -15,9 +15,11 @@ if ($device['os'] == 'comware') {
|
||||
$entphydata = dbFetchRows("SELECT `entPhysicalIndex`, `entPhysicalClass`, `entPhysicalName` FROM `entPhysical` WHERE `device_id` = ? AND `entPhysicalClass` REGEXP 'module|sensor' ORDER BY `entPhysicalIndex`", array(
|
||||
$device['device_id']
|
||||
));
|
||||
$tempdata = snmpwalk_cache_multi_oid($device, 'hh3cEntityExtTemperature', array(), 'HH3C-ENTITY-EXT-MIB');
|
||||
|
||||
if (!empty($entphydata)) {
|
||||
|
||||
$tempdata = snmpwalk_cache_multi_oid($device, 'hh3cEntityExtTemperature', array(), 'HH3C-ENTITY-EXT-MIB');
|
||||
|
||||
foreach ($entphydata as $index) {
|
||||
foreach ($tempdata as $tempindex => $value) {
|
||||
if ($index['entPhysicalIndex'] == $tempindex) {
|
||||
|
||||
Reference in New Issue
Block a user