mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Updated MGE UPS sensors and added traps (#9301)
* MGE: Improve support for Galaxy devices * MGE: Improve support for Galaxy devices * MGE: Improve support for Galaxy devices * rfc1628 adaptations for Eaton MGE Galaxy 7000 * eaton-mge: test data on a Galaxy 7000 * rfc1628 adaptations for Eaton MGE Galaxy 7000 * rfc1628 adaptations for Eaton MGE Galaxy 7000 * eaton-mgeups: test data on a Galaxy 7000 * Add upsmgUtilityFailure and upsmgUtilityRestored trap support for eaton-mgeups * dev: eaton-mgeups: OID in the dynamic definition for discovery * dev: eaton-mgeups: cleaning * add contributor * add contributor
This commit is contained in:
committed by
Neil Lathwood
parent
e9120085c9
commit
2125c8640b
@@ -6,6 +6,14 @@ $load_data = snmpwalk_group($device, 'upsOutputPercentLoad', 'UPS-MIB');
|
||||
|
||||
foreach ($load_data as $index => $data) {
|
||||
$load_oid = ".1.3.6.1.2.1.33.1.4.4.1.5.$index";
|
||||
|
||||
if (is_array($data['upsOutputPercentLoad'])) {
|
||||
$load_oid .= ".0";
|
||||
$value = $data['upsOutputPercentLoad'][0];
|
||||
} else {
|
||||
$value = $data['upsOutputPercentLoad'];
|
||||
}
|
||||
|
||||
$divisor = get_device_divisor($device, $pre_cache['poweralert_serial'], 'load', $load_oid);
|
||||
$descr = 'Percentage load';
|
||||
if (count($load_data) > 1) {
|
||||
@@ -26,6 +34,6 @@ foreach ($load_data as $index => $data) {
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
$data['upsOutputPercentLoad'] / $divisor
|
||||
$value / $divisor
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user