Introduction
First of all the result of this document are simple graphs from devices (e.g., Cisco) which do IPSLA monitoring. In my case I retrieve simple ICMP RTT values from my devices which I put into graphs.
You can use the following for adding any other data you want to graph as long as you are able to retrieve it (e.g., SNMP). For adding graphs containing data which directly corresponds to an interface you can use the SNMP data source template and OIDs? otherwise you might need to use the COMMAND template with those OIDs? (since 2.1.90 there is a template called build-in - I don't know what you can do with this one). If you are not sure if and how you can use this for your purpose: ask in the forums.
Preparations
In my case the graphs drawn are not directly related to an interface. The question is where should I put such graphs. As we can only add graphs to interfaces I chose a loopback interface which will hold the graphs. I chose this since it is very unlikely to be changed or disappear or turned off...
Select the device which does the IPSLA monitoring and then change to the interface you chose for holding the graphs. There click on the Template tab and Create local copy. Since I only want to have this special device/interface to hold this kind of graphs and data I create a local copy of the template. Modifying this template won't change anything for other devices or interfaces.
Now you have a local copy of that template and can modify it by clicking on it.
Adding data sources
Before you can add a data source you have to make sure which OIDs? correspond to which RTT value. Of course you can log onto your device or you can get the monitored RTT values with snmpwalk from the command line:
$ snmpwalk -c COMMUNITSTRING -v SNMPVERSION host1 .1.3.6.1.4.1.9.9.42.1.2.1.1.3 CISCO-RTTMON-MIB::rttMonCtrlAdminTag.1 = STRING: Latency to host2 CISCO-RTTMON-MIB::rttMonCtrlAdminTag.2 = STRING: Latency to host3 CISCO-RTTMON-MIB::rttMonCtrlAdminTag.3 = STRING: Latency to host4 CISCO-RTTMON-MIB::rttMonCtrlAdminTag.4 = STRING: Latency to host5 CISCO-RTTMON-MIB::rttMonCtrlAdminTag.5 = STRING: Latency to host6
You probably have a different output before and after the the = - before: depends on the fact if you have imported the appropriate MIB; after: depends on the description you gave the monitor on that device. Before the = you take the number after the last dot which can be used to retrieve the correct value for each monitored RTT value accroding to the monitored host, i.e., calling:
$snmpget -c COMMUNITYSTRING -v SNMPVERSION host1 .1.3.6.1.4.1.9.9.42.1.2.10.1.1.1 CISCO-RTTMON-MIB::rttMonLatestRttOperCompletionTime.1 = Gauge32: 136 milliseconds $
This returns the RTT value for host2.
$snmpget -c COMMUNITYSTRING -v SNMPVERSION host1 .1.3.6.1.4.1.9.9.42.1.2.10.1.1.4 CISCO-RTTMON-MIB::rttMonLatestRttOperCompletionTime.1 = Gauge32: 136 milliseconds $
This returns the RTT value for host5.
Now we have the OIDs? for our data sources. Add a data source which will correspond to one of the monitored hosts from above to that copied template. Give it a name of your choice and select Type: COMMAND and click OK. Zenoss ships with some COMMANDS you can use for retrieving all kind of data from different sources. We only need another snmpget to retrieve the required data. I somehow do not really like the build-in snmp polling command therefore I wrote a small script called snmp-ipsla.sh for our purpose. Put it into the folder $ZENHOME/libexec/. The script looks like this:
#!/bin/bash
latencyvalue=/usr/bin/snmpget $1 $2 $3 $4 | awk '{ print $4 }'
echo "|latency=${latencyvalue}"
The output has to look like this inorder Zenoss can parse it and we can use it as data point.
Back to our newly created data source. Put in the Command Template field the following:
snmp-ipsla.sh -${here/zSnmpVer} -c${here/zSnmpCommunity} ${here/manageIp} .1.3.6.1.4.1.9.9.42.1.2.10.1.1.1
Press Save. This will retrieve the RTT value for host2. Add a data point and call it latency. This string has to be the same as the string which is printed by the snmp-ipsla.sh script. The data point has to be of type Gauge and for completness put 0 in the RRD min value field and save. Switch back to the performance template window (containing all the data sources and graphs...).
Adding graphs
Add a new graph and choose a name you like. In the new window you have to define a graph point by adding a data point Add DataPoint?... - select the data source you created in the previous step. The graphs are now ready to be filled with the data sources you created.
Checking the graphs
Select the interface from the device's OS tab and check if the newly addred graph is drawn correctly (after 5-10 minutes time).
Troubleshooting
You can check the logs in $ZENHOME/log like zencommand.log and zenperfsnmp.log. Take a look at the Admin Guide or check the forums (I try to help there too).
Conclusion
After this you can actually add anything you like to be graphed - all you need are OIDs? (and probably MIBs?) and a place to add the data sources and graphs. If the graphs correspond to an interface it is very likely you can add the data source by simply adding the corresponding OID via the SNMP data source template - otherwise you probably need to use COMMAND.
