From c1702d643e4de01b18ab912fc6852136be43d1bd Mon Sep 17 00:00:00 2001 From: Rudy Hardeman Date: Tue, 12 May 2015 22:53:01 +0200 Subject: [PATCH] Miner fixes --- includes/discovery/current/apc.inc.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/discovery/current/apc.inc.php b/includes/discovery/current/apc.inc.php index 184fa3e05..499d913d4 100644 --- a/includes/discovery/current/apc.inc.php +++ b/includes/discovery/current/apc.inc.php @@ -96,7 +96,10 @@ if ($device['os'] == "apc") $lowlimit = snmp_get($device, $lowlimit_oid, "-Oqv", ""); $warnlimit = snmp_get($device, $warnlimit_oid, "-Oqv", ""); - if ($limit < 0 and $lowlimit < 0 and $warnlimit < 0){ + if ($limit < 0 && $lowlimit < 0 && $warnlimit < 0){ + + echo "Phase "; + $limit_oid = "1.3.6.1.4.1.318.1.1.12.2.2.1.1.4.".$index; #rPDULoadPhaseConfigOverloadThreshold $lowlimit_oid = "1.3.6.1.4.1.318.1.1.12.2.2.1.1.2.".$index; #rPDULoadPhaseConfigLoLoadThreshold $warnlimit_oid = "1.3.6.1.4.1.318.1.1.12.2.2.1.1.3.".$index; #rPDULoadPhaseConfigNearOverloadThreshold @@ -104,8 +107,6 @@ if ($device['os'] == "apc") $limit = snmp_get($device, $limit_oid, "-Oqv", ""); $lowlimit = snmp_get($device, $lowlimit_oid, "-Oqv", ""); $warnlimit = snmp_get($device, $warnlimit_oid, "-Oqv", ""); - - echo "Phase "; } discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, '10', '1', $lowlimit, NULL, $warnlimit, $limit, $current); }