I'm trying to write an SNMP query to extract information out of a table with index values predefined in the mib - so .1 == "A", .2 == "B", .3 == "C"
Is there any way to have these values translated and given back as an input so it can be used to identify what the index value is?
Extract text from translated OID?
Moderators: Developers, Moderators
Yes... would be easier if you posted an snmpwalk of the data you want. Also post the SNMP XML file you've got started for this. http://docs.cacti.net/
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Actually I'm not sure you can do what I was needing just using the cacti framework as is. To give you an example of the SNMP walk information:
RBN-SUBSCRIBER-ACTIVE-MIB::rbnSubsEncapsCount.ppp = Gauge32: 50 subscribers
RBN-SUBSCRIBER-ACTIVE-MIB::rbnSubsEncapsCount.pppoe = Gauge32: 50 subscribers
RBN-SUBSCRIBER-ACTIVE-MIB::rbnSubsEncapsCount.bridged1483 = Gauge32: 50 subscribers
RBN-SUBSCRIBER-ACTIVE-MIB::rbnSubsEncapsCount.routed1483 = Gauge32: 30 subscribers
RBN-SUBSCRIBER-ACTIVE-MIB::rbnSubsEncapsCount.multi1483 = Gauge32: 40 subscribers
RBN-SUBSCRIBER-ACTIVE-MIB::rbnSubsEncapsCount.dot1q1483 = Gauge32: 80 subscribers
RBN-SUBSCRIBER-ACTIVE-MIB::rbnSubsEncapsCount.dot1qEnet = Gauge32: 90 subscribers
RBN-SUBSCRIBER-ACTIVE-MIB::rbnSubsEncapsCount.clips = Gauge32: 40 subscribers
RBN-SUBSCRIBER-ACTIVE-MIB::rbnSubsEncapsCount.other = Gauge32: 60 subscribers
where the last segment of the OID would be the index name. The values are defined in the MIB as an OBJECT-TYPE.
As a workaround, I've extended data_query.php with a new source type thats available if you select an input field with type 'get'. The new source type is called 'translate' and simply calls the snmptranslate binary to convert an OID into the name.
RBN-SUBSCRIBER-ACTIVE-MIB::rbnSubsEncapsCount.ppp = Gauge32: 50 subscribers
RBN-SUBSCRIBER-ACTIVE-MIB::rbnSubsEncapsCount.pppoe = Gauge32: 50 subscribers
RBN-SUBSCRIBER-ACTIVE-MIB::rbnSubsEncapsCount.bridged1483 = Gauge32: 50 subscribers
RBN-SUBSCRIBER-ACTIVE-MIB::rbnSubsEncapsCount.routed1483 = Gauge32: 30 subscribers
RBN-SUBSCRIBER-ACTIVE-MIB::rbnSubsEncapsCount.multi1483 = Gauge32: 40 subscribers
RBN-SUBSCRIBER-ACTIVE-MIB::rbnSubsEncapsCount.dot1q1483 = Gauge32: 80 subscribers
RBN-SUBSCRIBER-ACTIVE-MIB::rbnSubsEncapsCount.dot1qEnet = Gauge32: 90 subscribers
RBN-SUBSCRIBER-ACTIVE-MIB::rbnSubsEncapsCount.clips = Gauge32: 40 subscribers
RBN-SUBSCRIBER-ACTIVE-MIB::rbnSubsEncapsCount.other = Gauge32: 60 subscribers
where the last segment of the OID would be the index name. The values are defined in the MIB as an OBJECT-TYPE.
As a workaround, I've extended data_query.php with a new source type thats available if you select an input field with type 'get'. The new source type is called 'translate' and simply calls the snmptranslate binary to convert an OID into the name.
Mind re-running that snmpwalk with the -On option to see the raw OIDs?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Who is online
Users browsing this forum: No registered users and 0 guests