Index: includes/discovery/sensors/xups-mib.inc.php =================================================================== --- includes/discovery/sensors/xups-mib.inc.php (revision 5714) +++ includes/discovery/sensors/xups-mib.inc.php (working copy) @@ -26,8 +26,6 @@ foreach (array_slice(array_keys($xups_array),1) as $phase) { - # FIXME: to poll: [xupsOutputLoad] => 15 - # Skip garbage output: # xupsOutput.6.0 = 0 # xupsOutput.7.0 = 0 @@ -101,6 +99,12 @@ ## No rename code for output power, this is a new measurement + ## Output Load + $oid = "1.3.6.1.4.1.534.1.4.1.0.$index"; # XUPS-MIB:xupsOutputLoad.$index + $descr = "Output Load"; + $value = $xups_array[$phase]['xupsOutputLoad']; + discover_sensor($valid['sensor'], 'capacity', $device, $oid, "xupsOutputLoad.".$index, 'xups', $descr, 1, $value); + # Bypass $index = $xups_array[$phase]['xupsBypassPhase']; $descr = "Bypass"; if ($xups_array[0]['xupsBypassNumPhases'] > 1) { $descr .= " Phase $index"; } @@ -152,8 +156,21 @@ $xups_array = snmpwalk_cache_multi_oid($device, "xupsBattery", $xups_array, "XUPS-MIB"); $xups_array = snmpwalk_cache_multi_oid($device, "xupsEnvironment", $xups_array, "XUPS-MIB"); -if (isset($xups_array[0]['upsBatCurrent'])) +if (isset($xups_array[0]['xupsBatTimeRemaining'])) { + $oid = "1.3.6.1.4.1.534.1.2.1"; # XUPS-MIB:xupsBatTimeRemaining.0 + $scale = 1/60; + discover_sensor($valid['sensor'], 'runtime', $device, $oid, "xupsBatTimeRemaining.0", 'xups', "Battery Runtime Remaining", $scale, $xups_array[0]['xupsBatTimeRemaining']); +} + +if (isset($xups_array[0]['xupsBatCapacity'])) +{ + $oid = "1.3.6.1.4.1.534.1.2.4"; # XUPS-MIB:xupsBatCapacity.0 + discover_sensor($valid['sensor'], 'capacity', $device, $oid, "xupsBatCapacity.0", 'xups', "Battery Capacity", 1, $xups_array[0]['xupsBatCapacity']); +} + +if (isset($xups_array[0]['xupsBatCurrent'])) +{ $oid = "1.3.6.1.4.1.534.1.2.3.0"; # XUPS-MIB:xupsBatCurrent.0 discover_sensor($valid['sensor'], 'current', $device, $oid, "xupsBatCurrent.0", 'xups', "Battery", 1, $xups_array[0]['xupsBatCurrent']);