Add Huawei VRP sensors to yaml and fix bug in functions.inc.php (#7918)

* Add Huawei sensors to yaml and fix bug in functions.inc.php

* Add Huawei sensors to yaml and fix bug in functions.inc.php
This commit is contained in:
Martin Zatloukal
2017-12-16 23:26:43 +01:00
committed by Neil Lathwood
parent c30a5e8977
commit e473b03697
8 changed files with 64 additions and 316 deletions

View File

@@ -986,8 +986,8 @@ function discovery_process(&$valid, $device, $sensor_type, $pre_cache)
foreach ($raw_data as $index => $snmp_data) {
$user_function = null;
if (isset($data['user_function'])) {
$user_function = $data['user_function'];
if (isset($data['user_func'])) {
$user_function = $data['user_func'];
}
// get the value for this sensor, check 'value' and 'oid', if state string, translate to a number
$data_name = isset($data['value']) ? $data['value'] : $data['oid']; // fallback to oid if value is not set