Advanced XML Query Question

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

Moderators: Developers, Moderators

Post Reply
cwhelan
Posts: 1
Joined: Tue Dec 05, 2006 3:24 pm

Advanced XML Query Question

Post by cwhelan »

When I walk my CMTS (Arris C4) I get the following format:
snmpwalk -v 1 -c 'pass' ip 1.3.6.1.4.1.4998.1.1.20.2.12.1.6

SNMPv2-SMI::enterprises.4998.1.1.20.2.12.1.6.918032.918097 = INTEGER: 113

Here is my question... I know how to create the XML snmp query, however, the last two numbers are the "variables" that I'm struggling with. Basically, the 918032 is the defined "Downstream" and the last number is the Indexed number I'm after the results for. Basically, I already have a script and it gets other data, but when it runs agains this OID, it looks like this:

1.3.6.1.4.1.4998.1.1.20.2.12.1.6.918097
1.3.6.1.4.1.4998.1.1.20.2.12.1.6.ifUpstreamID

When it needs to be:

1.3.6.1.4.1.4998.1.1.20.2.12.1.6.918032.918097
1.3.6.1.4.1.4998.1.1.20.2.12.1.6.ifDownstreamID.ifUpstreamID

I know it seems easy, but the 918032 number changes depending on the interface. Is there a way to "Wildcard" that specific spot so that I only get the results for the Interface (there will only ever be one "last" number, but multiple 2nd to last numbers)?[/b]
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

So what abount defining a two-dimensional index, holding the last two indices as a whole? This should be unique and so be acceptable as an index. Please try searching the forums. I've already answered this more than once, but it's a bit tricky. You need a VALUE/REGEXP that catches the last two indices
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests