Juniper MPLS LSP Data Query

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
tjh
Posts: 5
Joined: Fri Dec 23, 2011 4:39 am

Juniper MPLS LSP Data Query

Post by tjh »

Hi,

After some assistance with a data query that is not returning any data when I run a 'verbose query' within cacti. Manual snmpwalk of the OID returns the data.

As a base I have used the data query from this old post - http://forums.cacti.net/viewtopic.php?f=12&t=19985

I have updated the oid_index, oid_num_indexes and oid_index_parse (Using regex for a string index) but I am not having any luck.

*versbose query*
+ XML file parsed ok.
+ Executing SNMP get for num of indexes @ '.1.3.6.1.4.1.2636.3.2.1.4.0' Index Count: 70
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.2636.3.2.3.1.1' Index Count: 0
+ No SNMP data returned

$ snmpwalk -v1 -c public 10.1.1.1 .1.3.6.1.4.1.2636.3.2.1.4.0
MPLS-MIB::mplsActiveLsps.0 = INTEGER: 70

$ snmpwalk -v1 -c public 10.1.1.1 .1.3.6.1.4.1.2636.3.2.3.1.1
MPLS-MIB::mplsLspName.'to-node1-linkx........' = STRING: to-node1-linkx
MPLS-MIB::mplsLspName.'to-node1-linky........' = STRING: to-node1-linky
MPLS-MIB::mplsLspName.'to-node2-linkx........' = STRING: to-node2-linkx
MPLS-MIB::mplsLspName.'to-node2-linky........' = STRING: to-node2-linky
---snip---

Any help is appreciated
Thanks
tjh

XML query below;

<query>
<name>Juniper TE statistics</name>
<oid_index>.1.3.6.1.4.1.2636.3.2.3.1.1</oid_index>
<oid_num_indexes>.1.3.6.1.4.1.2636.3.2.1.4.0</oid_num_indexes>
<oid_index_parse>OID/REGEXP:^.{32}(.*)</oid_index_parse>
<fields>
<mplsPathName>
<name>mplsLspName</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.2636.3.2.3.1.1</oid>
</mplsPathName>
<mplsLspOctets>
<name>mplsLspOctets</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.2636.3.2.3.1.3</oid>
</mplsLspOctets>
<mplsLspPackets>
<name>mplsLspPackets</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.2636.3.2.3.1.4</oid>
</mplsLspPackets>
</fields>
</query>
tjh
Posts: 5
Joined: Fri Dec 23, 2011 4:39 am

Re: Juniper MPLS LSP Data Query

Post by tjh »

Now that I understand the oid_index_parse field I see that it is not correct.

I have updated the field to use;

^.{27}\.(.*)

Also;

.*\.2636\.[0-9]\.[0-9]\.[0-9]\.[0-9]\.[0-9]\.(.*)$

Both produce the same result as above... is there a problem with the regex that I am using the parse the oid?

index = .1.3.6.1.4.1.2636.3.2.3.1.1 (27 chars)

tjh

EDIT: FYI - I have now created a custom script for this but it does not scale for a large number of MPLS LSPs. Device CPU has increased as a result.
tjh
Posts: 5
Joined: Fri Dec 23, 2011 4:39 am

Re: Juniper MPLS LSP Data Query

Post by tjh »

The regex is now working. It was a problem with a high max-repetition count hard coded within php5-snmp.

see thread - http://forums.cacti.net/viewtopic.php?f=12&t=44672

tjh
mrgenius
Posts: 41
Joined: Fri Feb 18, 2005 4:37 pm

Re: Juniper MPLS LSP Data Query

Post by mrgenius »

Dear tjh,

can you share your template???

i am getting HEX values for the LSP names :(

+ Index found at OID: '1.3.6.1.4.1.2636.3.2.3.1.1.107.104.105.99.112.111.112.45.102.115.100.99.111.114.101.45.108.111.111.115.101.0.0.0.0.0.0.0.0.0.0.0' value: '6B:68:69:63:70:6F:70:2D:66:73:64:63:6F:72:65:2D:6C:6F:6F:73:65:00:00:00:00:00:00:00:00:00:00:00'
mrgenius
Posts: 41
Joined: Fri Feb 18, 2005 4:37 pm

Re: Juniper MPLS LSP Data Query

Post by mrgenius »

anyone to help?
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests