I’ve got this MIB I want to graph,
.1.3.6.1.4.1.9.9.84.1.1.1.1.3
cipPrecedenceSwitchedPkts from CISCO-IP-STAT-MIB.iso.org.dod.internet
It identifies the number of packets with a determined precedence and a direction.
So each interface has 16 rows under this MIB, so the interface 2:
.1.3.6.1.4.1.9.9.84.1.1.1.1.3.2
will have the direction IN(1) and OUT(2), defined by:
.1.3.6.1.4.1.9.9.84.1.1.1.1.3.2.1
and
.1.3.6.1.4.1.9.9.84.1.1.1.1.3.2.2
and, in this way each direction has 8 precedence types (0-7):
.1.3.6.1.4.1.9.9.84.1.1.1.1.3.2.1.0
. . .
.1.3.6.1.4.1.9.9.84.1.1.1.1.3.2.1.7
(for direction IN(1))
There are no other MIBs relevant to this like Indexes or so.
What I want to accomplish is to use the last 3 MIB levels to make the Index, so this is my solution.
Code: Select all
<interface>
<name>Get SNMP Interfaces Precedence</name>
<description>Queries a host for a list of monitorable cip precedence interfaces</description>
<oid_index>.1.3.6.1.4.1.9.9.84.1.1.1.1.3</oid_index>
<oid_index_parse>OID/REGEXP:.*\.([1-9][0-9]{0,1}\.[12]\.[0-7])$</oid_index_parse>
<index_order>ifInterface</index_order>
<index_order_type>numeric</index_order_type>
<index_title_format>|chosen_order_field|</index_title_format>
<fields>
<ifInterface>
<name>Interface</name>
<method>walk</method>
<source>index</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.9.9.84.1.1.1.1.3</oid>
</ifInterface>
<cipPreSwPkts>
<name>cipPrecedenceSwPkts</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.9.9.84.1.1.1.1.3</oid>
</cipPreSwPkts>
</fields>
</interface>
The problem is that it doesn’t work!
The XML is correctly parsed, but noting shows up at the Data Query.
Can anyone lend me a hand on this?
output code
Code: Select all
+ Running data query [14].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/home/cacti/www/resource/snmp_queries/interface_qos.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.9.9.84.1.1.1.1.3'
+ Located input field 'ifInterface' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.9.9.84.1.1.1.1.3'
+ Located input field 'cipPreSwPkts' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.9.9.84.1.1.1.1.3'
+ Found item [cipPreSwPkts='6997895'] index: 3 [from value]
+ Found item [cipPreSwPkts='6704'] index: 3 [from value]
+ Found item [cipPreSwPkts='31925'] index: 3 [from value]
+ Found item [cipPreSwPkts='0'] index: 3 [from value]
+ Found item [cipPreSwPkts='4553'] index: 3 [from value]
+ Found item [cipPreSwPkts='0'] index: 3 [from value]
+ Found item [cipPreSwPkts='336283'] index: 3 [from value]
+ Found item [cipPreSwPkts='627458'] index: 3 [from value]
+ Found item [cipPreSwPkts='14633'] index: 3 [from value]
+ Found item [cipPreSwPkts='0'] index: 3 [from value]
+ Found item [cipPreSwPkts='1173'] index: 3 [from value]
. . .
+ Found item [cipPreSwPkts='2021354'] index: 43 [from value]
+ Found item [cipPreSwPkts='11513033'] index: 43 [from value]
+ Found data query XML file at '/home/cacti/www/resource/snmp_queries/interface_qos.xml'
+ Found data query XML file at '/home/cacti/www/resource/snmp_queries/interface_qos.xml'
+ Found data query XML file at '/home/cacti/www/resource/snmp_queries/interface_qos.xml'