|
|
| Author |
Message |
gcoco
Joined: 12 May 2008 Posts: 1
|
Posted: Mon May 12, 2008 3:20 pm Post subject: Getting index to be stored from complex OID value. |
|
|
Hi,
I am trying to build an SNMP data query for a Redback SMS500 to get ATM VC usage/error statistics. The problem with the Redback is that the ifindex does not match the index associated with the MIBs I am trying to poll.
The SNMP OID's contain a reference to the AAL5 ifindex of the interface to poll and then the VPI and VCI of the circuit to look at.
| Code: | eg. Polling ATM VC - 0.33 on AAL5 interface with ifindex = 5
IF-MIB::ifIndex.5 = INTEGER: 5
IF-MIB::ifDescr.5 = STRING: AAL5 layer interface
[u].1.3.6.1.4.1.2352.3.1.1.1.1.3[/u].[b]5.0.33[/b] = Counter32: 3218260 (<- Input Octets OID + ifindex.vpi.vci)
[u].1.3.6.1.4.1.2352.3.1.1.1.1.4[/u].[b]5.0.33[/b] = Counter32: 981704592 (<- Output Octets OID + ifindex.vpi.vci) |
I initially built an XML SNMP data query as follows (using the A New SNMP Data Query documentation on cacti website):
| Code: | <interface>
<name>Redback ATM VCL Statistics</name>
<description>Get Redback ATM VCL Statistics</description>
<oid_index>.1.3.6.1.4.1.2352.3.1.1.1.1.3</oid_index>
<oid_index_parse>OID/REGEXP:.*\.([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,4})$</oid_index_parse>
<index_order_type>numeric</index_order_type>
<index_title_format>AAL5 ifIndex.VPI.VCI</index_title_format>
<fields>
<Index>
<name>Index</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.2352.3.1.1.1.1.3</oid>
</Index>
<AtmAal5VclInOctets>
<name>AAL5 VCL In Oct</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.2352.3.1.1.1.1.3</oid>
</AtmAal5VclInOctets>
<AtmAal5VclOutOctets>
<name>AAL5 VCL Out Oct</name>
<method>walk</method>
<source>value</source>
<direction>outinput</direction>
<oid>.1.3.6.1.4.1.2352.3.1.1.1.1.4</oid>
</AtmAal5VclOutOctets>
<aal5VccCrcErrors>
<name>AAL5 VCL CRC Err</name>
<method>walk</method>
<source>value</source>
<direction>outinput</direction>
<oid>.1.3.6.1.2.1.37.1.12.1.3</oid>
</aal5VccCrcErrors>
<aal5VccSarTimeOuts>
<name>AAL5 VCL SAR Timeouts</name>
<method>walk</method>
<source>value</source>
<direction>outinput</direction>
<oid>.1.3.6.1.2.1.37.1.12.1.4</oid>
</aal5VccSarTimeOuts>
</fields>
</interface> |
A verbose debug shows that this is nearly working:
| Code: | + Running data query [15].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/htdocs/cacti/resource/snmp_queries/redback_atmvc_stats.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.2352.3.1.1.1.1.3'
+ Located input field 'Index' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.2352.3.1.1.1.1.3'
+ Found item [Index='3245000'] index: 5.0.33 [from value] |
My problem is that I do not want INDEX to store the value found from index, I want it to store the index eg. 5.0.33
What do I need to change in my XML file to make this happen?
Any takers?
Thanks
Gareth |
|
| Back to top |
|
 |
gandalf Developer
Joined: 02 Dec 2004 Posts: 11619 Location: Muenster, Germany
|
Posted: Tue May 13, 2008 2:37 pm Post subject: |
|
|
Try | Code: | <Index>
<name>Index</name>
<method>walk</method>
<source>index</source>
<direction>input</direction>
</Index> | Not totally positive, whether <method> is required.
Reinhard |
|
| Back to top |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|