mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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:
6
includes/polling/sensors/state/eds.inc.php
Normal file
6
includes/polling/sensors/state/eds.inc.php
Normal 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"]));
|
||||
}
|
6
includes/polling/sensors/temperature/eds.inc.php
Normal file
6
includes/polling/sensors/temperature/eds.inc.php
Normal 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"]));
|
||||
}
|
Reference in New Issue
Block a user