diff --git a/includes/discovery/current/apc.inc.php b/includes/discovery/current/apc.inc.php index 9713c24639..e202823ce0 100644 --- a/includes/discovery/current/apc.inc.php +++ b/includes/discovery/current/apc.inc.php @@ -172,6 +172,13 @@ if ($device['os'] == "apc") } unset($oids); + + # UPS + $output_load = snmp_get($device, "upsAdvOutputLoad", "-Oqv", "PowerNet-MIB"); + if (empty($output_load)) { + $output_load = snmp_get($device, "upsHighPrecOutputLoad", "-Oqv", "PowerNet-MIB"); + } + discover_sensor($valid['sensor'], 'current', $device, "upsAdvOutputLoad", 1, 'apc', 'OutputLoad','10','1',NULL,NULL,NULL,NULL,$output_load); } ?> diff --git a/includes/polling/functions.inc.php b/includes/polling/functions.inc.php index 63d6b53868..e82c300f17 100644 --- a/includes/polling/functions.inc.php +++ b/includes/polling/functions.inc.php @@ -22,6 +22,10 @@ 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_get($device, $sensor['sensor_oid'], "-OUqnv", "SNMPv2-MIB"))); } } else if ($sensor['poller_type'] == "agent")