Hello community,
Didn’t find exact topic, so looking for help here.
We are using APC switched/metered PDU AP8659.
LibreNMS gets a lot of data from PDU via SNMP and works fine.
What we miss - Power and energy consumption per outlet.
In the Device Overview section (page), we see the following subsections:
Temperature,
Humidity,
Voltage, per device
Current, per outlet
Power, Total (per device)
Power consumed, Total
and State
In the Current subsection, LibreNMS shows the current value of each outlet.
In the Power and Power consumed subsections, LibreNMS only shows Total power and total device consumption.
We really need LibreNMS to show Power in the same way as it shows Current - the value per outlet
We really need LibreNMS to show Power Consumed (energy) per outlet.
I want to ask LibreNMS devs, can it be possible to add the necessary data?
Or maybe you can help me figure out how to do it myself?
PS. I’ve added Custom OIDs at the moment and I’m getting the information I need . However, I think adding missing data to overview section would be beneficial for everyone.
Thank you @laf that pointed me in the right direction.
Someone was very smart and left remark # rPDULoadStatusLoad and rPDU2PhaseStatusCurrent at OID .1.3.6.1.4.1.318.1.1.26.6.3.1.5 is done in the includes/discovery/sensors/current/apc.inc.php:19 file
It saved for me alot of time. Thanks for him
To get what i need, it seems enough in includes/discovery/sensors/current/apc.inc.php // Per Outlet Power Bar section insert:
// Actual power OID
$actual_power_oid = ‘.1.3.6.1.4.1.318.1.1.26.9.4.3.1.7.’ . $index;
and
// Get the actual power value without division
$actual_power = snmp_get($device, $actual_power_oid, ‘-Oqv’, ‘’);
and right after current register power:
// Power discovery without value division
discover_sensor(null, ‘power’, $device, $actual_power_oid, $index, $type, $descr, ‘10’, ‘1’, null, null, null, null, $actual_power);
Next pitstop…
additionally to actual power sent by outlet we need to see energy sent by outlet.
i have tried to add like power, but with no luck.
$energy_oid = ‘.1.3.6.1.4.1.318.1.1.26.9.4.3.1.11.’ . $index;
$energy_kwh = snmp_get($device, $energy_oid, ‘-Oqv’, ‘’);
discover_sensor(null, ‘Energy sent by Outlet’, $device, $energy_oid, $index, $type, $descr . ’ - Energy since ’ . $start_time, ‘10’, ‘1’, null, null, null,