mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Merge pull request #981 from NURDspace/apc-fix
Fixed apc powerbar phase limit discovery for AP7852 firmware: 2.7.3
This commit is contained in:
@@ -5,6 +5,10 @@ if ($device['os'] == "apc")
|
||||
{
|
||||
# PDU - Phase
|
||||
$oids = snmp_walk($device, "rPDUStatusPhaseIndex", "-OsqnU", "PowerNet-MIB");
|
||||
if (empty($oids)) {
|
||||
$oids = snmp_walk($device, "rPDULoadPhaseConfigIndex", "-OsqnU", "PowerNet-MIB");
|
||||
}
|
||||
|
||||
if ($oids)
|
||||
{
|
||||
if ($debug) { echo($oids."\n"); }
|
||||
@@ -96,7 +100,10 @@ if ($device['os'] == "apc")
|
||||
$lowlimit = snmp_get($device, $lowlimit_oid, "-Oqv", "");
|
||||
$warnlimit = snmp_get($device, $warnlimit_oid, "-Oqv", "");
|
||||
|
||||
discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, '10', '1', $lowlimit, NULL, $warnlimit, $limit, $current);
|
||||
if ($limit != -1 && $lowlimit != -1 && $warnlimit != -1)
|
||||
{
|
||||
discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, '10', '1', $lowlimit, NULL, $warnlimit, $limit, $current);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,4 +216,4 @@ if ($device['os'] == "apc")
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
Reference in New Issue
Block a user