Files
Tony MurrayandNeil Lathwood 39804b047d refactor: rfc1628 sensor tidy up (#7341)
* refactor: rfc1628 tidy up
reduce the amount of snmp calls

* Did not finish re-writing rfc1628 load

* fix type in bypass power oid

* remove testing changes
2017-09-19 20:12:04 +01:00

26 lines
494 B
PHP

<?php
// RFC1628 UPS
echo 'RFC1628 ';
$value = snmp_get($device, 'upsEstimatedChargeRemaining.0', '-OvqU', 'UPS-MIB');
if (is_numeric($value)) {
discover_sensor(
$valid['sensor'],
'charge',
$device,
'.1.3.6.1.2.1.33.1.2.4.0',
500,
'rfc1628',
'Battery charge remaining',
1,
1,
15,
50,
null,
101,
$value
);
}