Linux – Can cacti display some TEXT output from mib at the graph

cactilinuxmonitoringrrdtoolsnmp

My switch can check if there is an SFP connector present in its ports and their respective link status.
I want to display this information in Cacti graphs for each interface of my switch.
The switch gives output in this format:

some_oid.1 = Description of port
some_oid.2 = Port Mac Addr
some_oid.3 = UP/DOWN (for Link)
some_oid.4 = YES/NO (for SFP connector)

I configured Cacti to get this information for all ports via a PHP script, but I don't know how to modify the graph template to display this information.

Screenshot of my desired result: https://pp.vk.me/c622022/v622022509/27f5e/-cSLkjgV3rg.jpg

Best Answer

I don't know the OID for the SFP status, but it's simple to add the others.

Duplicate your graph template that you use (I like having the total bandwidth) duplicate Add comment lines to your graph that include query for the items you want items

Here is one item so you can see how I made them, they are all pretty much the same... item

Change your graphs to use this template, or if you want it within the list of available templates when you create graphs for a device, then edit the Data Query to include this template...

"Data Queries" >> "SNMP - Interface Statistics" >> Add the graph template, and duplicate its settings from the original graph.

Here is my graphs;

result

Adding the SFP information would be simple if you know the OID. Edit the XML resource/snmp_queries/interface.xml to include the base OID for the SFP status.