Extract text from translated OID?

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
meralias
Posts: 46
Joined: Tue Nov 14, 2006 7:07 am

Extract text from translated OID?

Post by meralias »

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?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

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/
meralias
Posts: 46
Joined: Tue Nov 14, 2006 7:07 am

Post by meralias »

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.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Mind re-running that snmpwalk with the -On option to see the raw OIDs?
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests