Miner fixes

This commit is contained in:
Rudy Hardeman
2015-05-12 22:53:01 +02:00
parent 7600cc4f85
commit c1702d643e

View File

@ -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);
}