From 4b282018b241ce90debfe6d2291413c60bc024b9 Mon Sep 17 00:00:00 2001 From: laf Date: Sat, 9 Jul 2016 22:33:42 +0100 Subject: [PATCH] Check firmware version of poweralert units before applying divisor for current sensor --- includes/discovery/sensors/current/rfc1628.inc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/discovery/sensors/current/rfc1628.inc.php b/includes/discovery/sensors/current/rfc1628.inc.php index 51a3833738..f4bd15d39a 100644 --- a/includes/discovery/sensors/current/rfc1628.inc.php +++ b/includes/discovery/sensors/current/rfc1628.inc.php @@ -2,7 +2,10 @@ $divisor = 10; if ($device['os'] == 'poweralert') { - $divisor = 1; + $serial = trim(snmp_get($device, '.1.3.6.1.4.1.850.100.1.1.4.0', '-Ovq', 'TRIPPLITE-MIB'), '"'); + if (version_compare($serial, '12.04.0055', '>=')) { + $divisor = 1; + } } // RFC1628 UPS