CyberPower UPS & PRTG

Last modified date

Comments: 0

My small home lab is protected by a CyberPower CP900 UPS (full spec here). I will write-up configuring the CyberPower PowerPanel software (I used their CentOS VM which comes as an ESXi OVF template so is really easy to deploy) in another post soon. Update 29th May 2020 – setting up PowerPanel is detailed here:

To monitor the UPS via the PowerPanel VMusing PRTG needs a little bit of legwork as PRTG doesn’t have support out of the box. I did all the work on my PRTG server, so download files and install the utilities on that.

The Walk-through

The first thing to grab are the CyberPower MIB files. If MIB, OIDS and the like are new to you, there’s a good concise explanation over on the PRTG website. At the time of writing this, the CP MIB files are available here:

https://www.cyberpowersystems.com/products/software/mib-files/

You’ll also need the free PRTG SNMP MIB Importer tool:

https://www.paessler.com/tools/mibimporter

Unpack and install the MIB Importer, then unpack the CP MIB archive (there was a single .MIB file in my download) and launch the MIB Importer to see this screen:

Click File > Import MIB file, navigate to where you unpacked the MIB file to and let the Importer process the file. If all is good, the Import Log should look something like this:

Close the Import Log window and you should see lots of OID lovelyness:

Click File > Save for PRTG Network Monitor. You need to save the .oidlib file the importer is generating into the snmplibs folder in your PRTG installation. I have PRTG installed to E:\PRTG on my server, so for me it went into E:\PRTG\snmplibs. The filename isn’t hugely important but you need to be able to pick it from a list later – I went with CyberPower UPS.oidlib:

At this point we need to enable SNMP on the CyberPower PowerPanel VM – this can be done via the web GUI. Log into your instance of PowerPanel and click Setting > SNMP on the top menu bar.

I decided to enable SNMP v3 but you could enable SNMP v1 if you wanted. Note the top SNMP Settings section on this screen is often collapsed, so you will need to expand it to see this to enable your flavour of SNMP:

Now click the SNMP v3 row / profile you want to use and the Edit button should then become active. Enter the appropriate settings, 192.168.2.22 being the IP of my PRTG server (so replace as needed). I did try briefly to use authentication but couldn’t hit the right settings to get it working – this is something I should revisit in the future…

If you want/need to test your SNMP configuration, another free PRTG tool is the SNMP tester (download). You can enter the IP / SNMP details for your PowerPanel VM to see if it answers and what values are returned. A Custom OID to try is below – this should return the model of the UPS connected.

1.3.6.1.4.1.3808.1.1.1.1.1.1.0

Switch back to PRTG and add a new device to monitor (the PRTG doc’s for this are here if you need a helping hand). You point the device at the IP of the PowerPanel VM. When adding the device (name, IP etc), scroll down the dialogue and find the “Credentials for SNMP devices” section. Disable inheritance and enter the details to match the ones you configured in PowerPanel earlier on.

The final step is add sensors to the UPS metrics you want to monitor . I picked out four OIDs to monitor initially:

#Battery capacity in %
#OID name is: ups advance battery capacity
1.3.6.1.4.1.3808.1.1.1.2.2.1.0

#Input status
#OID name is: ups advance input status
1.3.6.1.4.1.3808.1.1.1.3.2.6.0

#Output status
#OID name is: ups base output status
1.3.6.1.4.1.3808.1.1.1.4.1.1.0

#Battery Runtime Remaining
#OID name is: ups advance battery run time remaining
1.3.6.1.4.1.3808.1.1.1.2.2.4.0

Add a new sensor to the PRTG device you just created and to filter down the list of sensors, pick “Monitor What?” – Custom Sensors and “Technology Used?” – SNMP.

Pick “SNMP Library” from the reduced sensor list shown and then pick the name of the PRTG .oidlib file you created:

The list of things to monitor is three pages, so use the search facility to narrow things down by OID name (not number):

Create the sensor, then rinse & repeat for anything else you want to monitor. The end result is hopefully a series of sensors for the PowerPanel VM device showing you the UPS status:

If you want to have a better poke around to see what you can monitor, the PRTG MIB Importer lets you look through the MIB tree. The Description field for each OID gives you helpful pointers as to what you can monitor:

Chris

Leave a Reply

Your email address will not be published. Required fields are marked *

Post comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.