From b992bac145ec0b0afa3dd83b944c9ece49774e0b Mon Sep 17 00:00:00 2001 From: Neil Lathwood Date: Sun, 12 Apr 2015 22:00:47 +0100 Subject: [PATCH] using snmpwalk instead of get --- includes/polling/functions.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/polling/functions.inc.php b/includes/polling/functions.inc.php index 115fc0033..59677e2e8 100644 --- a/includes/polling/functions.inc.php +++ b/includes/polling/functions.inc.php @@ -22,11 +22,11 @@ function poll_sensor($device, $class, $unit) sleep(1); # Give the TME some time to reset } } else { - $tmp_mib = 'SNMPv2-MIB'; if ($sensor['sensor_type'] == 'apc') { - $tmp_mib .= ':PowerNet-MIB'; + $sensor_value = trim(str_replace("\"", "", snmp_walk($device, $sensor['sensor_oid'], "-OUqnv", "SNMPv2-MIB:PowerNet-MIB"))); + } else { + $sensor_value = trim(str_replace("\"", "", snmp_get($device, $sensor['sensor_oid'], "-OUqnv", "SNMPv2-MIB"))); } - $sensor_value = trim(str_replace("\"", "", snmp_get($device, $sensor['sensor_oid'], "-OUqnv", "$tmp_mib"))); } } else if ($sensor['poller_type'] == "agent") {