I created an SNMP .xml query based on this page - http://www.cacti.net/downloads/docs/htm ... y_xml.html - and looking at the interface.xml that comes with Cacti.
I've tried various combinations of methods and sources in the 'ifSessions' field get the actual integer value (the session count) for each line, but so far I've only been able to get the query to pull the IP.
Can anyone shed any light on what I need to change to get it to pull the integer values of each line? Hopefully it's something simple that I've overlooked
Thanks!
Sample of snmpwalk output:
My XML query:.1.3.6.1.4.1.1991.1.1.4.23.1.1.15.xx.yy.zz.10 = INTEGER: 5356
.1.3.6.1.4.1.1991.1.1.4.23.1.1.15.xx.yy.zz.11 = INTEGER: 872
.1.3.6.1.4.1.1991.1.1.4.23.1.1.15.xx.yy.zz.12 = INTEGER: 4222
.1.3.6.1.4.1.1991.1.1.4.23.1.1.15.xx.yy.zz.13 = INTEGER: 4398
.1.3.6.1.4.1.1991.1.1.4.23.1.1.15.xx.yy.zz.14 = INTEGER: 498
Code: Select all
<query>
<name>Get Brocade ADX VIPs</name>
<description>Queries a Brocade ADX for a list of monitorable VIPs</description>
<oid_index>.1.3.6.1.4.1.1991.1.1.4.23.1.1.15</oid_index>
<oid_index_parse>OID/REGEXP:.*\.([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})$</oid_index_parse>
<index_order_type>numeric</index_order_type>
<index_title_format>|chosen_order_field|</index_title_format>
<fields>
<ifIP>
<name>VIP Address</name>
<method>walk</method>
<source>OID/REGEXP:.*\.([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})$</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.1991.1.1.4.23.1.1.15</oid>
</ifIP>
<ifSessions>
<name>Sessions</name>
<method>walk</method>
<source>VALUE/REGEXP:.*\.([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})$</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.1991.1.1.4.23.1.1.15</oid>
</ifSessions>
</fields>
</query>
Code: Select all
+ Running data query [11].
+ Found type = '3' [SNMP Query].
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/cacti-brocade-adx-vips.xml'
+ XML file parsed ok.
+ <oid_num_indexes> missing in XML file, 'Index Count Changed' emulated by counting oid_index entries
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.1991.1.1.4.23.1.1.15' Index Count: 164
+ Index found at OID: '1.3.6.1.4.1.1991.1.1.4.23.1.1.15.xx.yy.zz.10' value: '5482'
+ Index found at OID: '1.3.6.1.4.1.1991.1.1.4.23.1.1.15.xx.yy.zz.11' value: '792'
+ Index found at OID: '1.3.6.1.4.1.1991.1.1.4.23.1.1.15.xx.yy.zz.12' value: '3626'
+ Index found at OID: '1.3.6.1.4.1.1991.1.1.4.23.1.1.15.xx.yy.zz.15' value: '3668'
+ Index found at OID: '1.3.6.1.4.1.1991.1.1.4.23.1.1.15.xx.yy.zz.23' value: '458'
+ index_parse at OID: '1.3.6.1.4.1.1991.1.1.4.23.1.1.15.xx.yy.zz.10' results: 'xx.yy.zz.10'
+ index_parse at OID: '1.3.6.1.4.1.1991.1.1.4.23.1.1.15.xx.yy.zz.11' results: 'xx.yy.zz.11'
+ index_parse at OID: '1.3.6.1.4.1.1991.1.1.4.23.1.1.15.xx.yy.zz.12' results: 'xx.yy.zz.12'
+ index_parse at OID: '1.3.6.1.4.1.1991.1.1.4.23.1.1.15.xx.yy.zz.15' results: 'xx.yy.zz.15'
+ index_parse at OID: '1.3.6.1.4.1.1991.1.1.4.23.1.1.15.xx.yy.zz.23' results: 'xx.yy.zz.23'
+ Located input field 'ifIP' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.1991.1.1.4.23.1.1.15'
+ Found item [ifIP='xx.yy.zz.10'] index: xx.yy.zz.10 [from regexp oid parse]
+ Found item [ifIP='xx.yy.zz.11'] index: xx.yy.zz.11 [from regexp oid parse]
+ Found item [ifIP='xx.yy.zz.12'] index: xx.yy.zz.12 [from regexp oid parse]
+ Found item [ifIP='xx.yy.zz.15'] index: xx.yy.zz.15 [from regexp oid parse]
+ Found item [ifIP='xx.yy.zz.23'] index: xx.yy.zz.23 [from regexp oid parse]