From 190ee810aa94b0325ffbcdf06f035cd731724cf3 Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Tue, 13 Jul 2010 10:33:07 +0000 Subject: [PATCH] name current differently on single phase APC PDUs git-svn-id: http://www.observium.org/svn/observer/trunk@1350 61d68cd4-352d-0410-923a-c4978735b2b8 --- includes/discovery/current.inc.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/includes/discovery/current.inc.php b/includes/discovery/current.inc.php index bb6f2255d..41de5ec9a 100644 --- a/includes/discovery/current.inc.php +++ b/includes/discovery/current.inc.php @@ -39,7 +39,14 @@ if ($device['os'] == "apc") $limit = snmp_get($device, $limit_oid, "-Oqv", ""); # No / $precision here! Nice, APC! $lowlimit = snmp_get($device, $lowlimit_oid, "-Oqv", ""); # No / $precision here! Nice, APC! $warnlimit = snmp_get($device, $warnlimit_oid, "-Oqv", ""); # No / $precision here! Nice, APC! - $descr = "Phase $phase"; + if (count(explode("\n",$oids)) != 1) + { + $descr = "Phase $phase"; + } + else + { + $descr = "Output"; + } echo discover_current($valid_current,$device, $current_oid, $index, $type, $descr, $precision, $lowlimit, $warnlimit, $limit, $current); }