Workaround of bad SNMP implementation in EDS device. (#9801)

* Correcting bad SNMP behaviour

* Correcting bad SNMP behaviour

* change a file to force travis to re-run
This commit is contained in:
PipoCanaja
2019-02-13 00:54:57 +01:00
committed by Tony Murray
parent 5141717e83
commit 1d1962af83
2 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,6 @@
<?php
//Workaround for bad behaviour of the SNMP engine in EDS device.
//a ".0" is added in snmpget compared to snmpwalk of the same table.
if (!array_key_exists($sensor['sensor_oid'], $snmp_data) && array_key_exists($sensor['sensor_oid'].".0", $snmp_data)) {
$sensor_value = trim(str_replace('"', '', $snmp_data[$sensor['sensor_oid'].".0"]));
}

View File

@ -0,0 +1,6 @@
<?php
//Workaround for bad behaviour of the SNMP engine in EDS device.
//a ".0" is added in snmpget compared to snmpwalk of the same table.
if (!array_key_exists($sensor['sensor_oid'], $snmp_data) && array_key_exists($sensor['sensor_oid'].".0", $snmp_data)) {
$sensor_value = trim(str_replace('"', '', $snmp_data[$sensor['sensor_oid'].".0"]));
}