TECHZEN Zenoss User Community ARCHIVE  

Graph point name from SNMP output

Subject: Graph point name from SNMP output
Author: Brandon Towne
Posted: 2020-09-21 17:45

Is there a way to make the name of a graph data point be the output of a corresponding OID? We have ICT Electrical Distribution panels and I can pull the Amps easily enough. There are 2 banks of 4 so I was going to group each bank. There is an OID that outputs the name and corresponds to the Amp data point. But right now we have to log into the ICT to get the name that corresponds. Thanks!

Brandon Towne

Subject: RE: Graph point name from SNMP output
Author: Michael Rogers
Posted: 2020-09-22 13:57


Do the names of the panels change from device to device?  I.e., it's not consistently "Bank 1, Unit 1" through to "Bank 2, Unit 4?"

The normal thing to do when monitoring something that shows up multiple times and differs from instance to instance is to build a modeler and capture them as components.  The ZenPack SDK has some tutorials on component modeling that may be of use to you.

If you're currently monitoring them at the device level and you'd like a custom graph legend for each device, there *is* a way to do it, but it requires some manual intervention.  The process looks something like this:

1. Create 8 new string-type custom properties, one for each data point (I'm assuming 2 banks of 4).  For example, "cICTPanelBank1Unit1".
2. Go to the template you're using for these devices.
3. Select the graph for the Bank 1 datapoints.  Click the "Action Wheel" and choose "Manage Graph Points."
4. Double click the Bank1Unit1 datapoint.
5. In the legend field, type in the value ${here/cICTPanelBank1Unit1}
6. Repeat this step for the remaining 7 graph points on the template.
7. Now, you can go to each device and provide appropriate names by updating the relevant cProperty.  

When you visit the graph page for one of these devices, the ${here/cICTPanelBank1Unit1} expression will substitute the configured cProp string.

I won't lie: as workarounds go, this one is fairly tedious.  After it's in place, you might write a custom script that takes advantage of the Zenoss JSON API that, coupled with some judicious snmpgets, sets all of your cProps for you.  Of course, by this point, you might be better off spending that time learning to write your own modeler plugin.  

I hope this helps!

Michael J. Rogers
Senior Instructor - Zenoss
Austin TX

< Previous
snmp trap email missing event details
Snapshot error