Add Power values for Cisco switches

I want to add current power values to more devices in our comms room, can anyone help with this? Mainly Cisco devices to see how much power they are using.
the power shows correctly for some of my HP and DELL servers but not cisco?

Hi @karl_newman
If the values are available over SNMP, then they can be added. You can do it yourself directly (links in the Issue Template) or you can open an issue in GitHub with all the requested data, and list the OIDs that contains the data you would like to add (but this will take a long time to be merged, cause we have a lot of pending issues in the pipe).

It’s not straightforward from a dig about the SNMP tree as the recorded units vary from device to device.

On the devices where it’s available you start at (cefcFRUPower)


On a (e.g.) Cat4900M this gives you:

. 8000
. 5658

but the units are defined at (cefcPowerUnits)

On the same switch the value is:

. "centiAmpsAt12V"

For the values above that gives you a calculation of:

8000 x 0.01 x 12 = 960W
5658 x 0.01 x 12 = 679W

Matching the output of the IOS sh power command. So far so good…

But on a Cat6k the OIDs give you:

. "centiAmpsAt42v"
. "centiAmpsAt42v"
. 6598
. 6598
. 3796
. 3796

Which changes the calculation for that device to:

6598 x 0.01 x 42 = 2771.16W
3796 x 0.01 x 42 = 1594.32W

According to the structure you describe, this can be achieved via PHP code only, not YAML.

You can have a look at this directory of your LibreNMS install for power sensor discovery:

Each of the files in this directory are named after the “os” of the device you want to discover. Your file would need to be named “” to be properly called.
In this file, you would need to :

  • Check if you have data in the expected part of the SNMP tree
  • Compute the exact OID
  • Adapt the “multiplier” and “divisor” value according to the centiampsAtXXX value so you get the proper WATT value
  • Call the “discover_sensor” function to register your sensor.

Then the polling itself will run automagically after discover sensor is done correctly.

You should probably open a git PullRequest, so we can follow your code write, and help you in case needed.


1 Like

Thanks very much for your responses, i will look through and let you know how i got on.