i have create a template for the Huawei QoS Port Queue Statistik.
This is working, but not really smart.
It is based on a snmp-index template.
The OID is: .1.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1
Code: Select all
# snmpwalk -v 2c -c xxxxx xxxxxx .1.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1
SNMPv2-SMI::enterprises.2011.5.25.32.4.1.1.31.1.1.6.2.1 = INTEGER: 6
SNMPv2-SMI::enterprises.2011.5.25.32.4.1.1.31.1.1.6.2.2 = INTEGER: 6
SNMPv2-SMI::enterprises.2011.5.25.32.4.1.1.31.1.1.6.2.3 = INTEGER: 6
SNMPv2-SMI::enterprises.2011.5.25.32.4.1.1.31.1.1.6.2.4 = INTEGER: 6
SNMPv2-SMI::enterprises.2011.5.25.32.4.1.1.31.1.1.6.2.5 = INTEGER: 6
SNMPv2-SMI::enterprises.2011.5.25.32.4.1.1.31.1.1.6.2.6 = INTEGER: 6
SNMPv2-SMI::enterprises.2011.5.25.32.4.1.1.31.1.1.6.2.7 = INTEGER: 6
SNMPv2-SMI::enterprises.2011.5.25.32.4.1.1.31.1.1.6.2.8 = INTEGER: 6
SNMPv2-SMI::enterprises.2011.5.25.32.4.1.1.31.1.1.7.2.1 = INTEGER: 7
SNMPv2-SMI::enterprises.2011.5.25.32.4.1.1.31.1.1.7.2.2 = INTEGER: 7
SNMPv2-SMI::enterprises.2011.5.25.32.4.1.1.31.1.1.7.2.3 = INTEGER: 7
SNMPv2-SMI::enterprises.2011.5.25.32.4.1.1.31.1.1.7.2.4 = INTEGER: 7
SNMPv2-SMI::enterprises.2011.5.25.32.4.1.1.31.1.1.7.2.5 = INTEGER: 7
SNMPv2-SMI::enterprises.2011.5.25.32.4.1.1.31.1.1.7.2.6 = INTEGER: 7
SNMPv2-SMI::enterprises.2011.5.25.32.4.1.1.31.1.1.7.2.7 = INTEGER: 7
SNMPv2-SMI::enterprises.2011.5.25.32.4.1.1.31.1.1.7.2.8 = INTEGER: 7
InterfaceIndex.Direction.Queue
6 . 2 . 1
Here my SNMP-query XML File:
Code: Select all
hwXQoSPortQueueStatisticsTable.xml
<interface>
<name>Get Huawei QoS Port Queue Statistics</name>
<oid_index>.1.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1</oid_index>
<oid_index_parse>OID/REGEXP:^.{40}(.*)</oid_index_parse>
<index_order>qosIndex</index_order>
<index_order_type>numeric</index_order_type>
<fields>
<qosIndex>
<name>Index</name>
<method>walk</method>
<source>index</source>
<direction>input</direction>
</qosIndex>
<hwXQoSPortQueueStatisticsInterfaceIndex>
<name>Name</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1</oid>
</hwXQoSPortQueueStatisticsInterfaceIndex>
<hwXQoSPortQueueStatisticsQueueIndex>
<name>QueueIndex</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.3</oid>
</hwXQoSPortQueueStatisticsQueueIndex>
<hwXQoSPortQueueStatisticsTotalPassPackets>
<name>TotalPassPackets</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.5</oid>
</hwXQoSPortQueueStatisticsTotalPassPackets>
<hwXQoSPortQueueStatisticsTotalPassBytes>
<name>TotalPassBytes</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.6</oid>
</hwXQoSPortQueueStatisticsTotalPassBytes>
<hwXQoSPortQueueStatisticsTotalDiscardPackets>
<name>TotalDiscardPackets</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.7</oid>
</hwXQoSPortQueueStatisticsTotalDiscardPackets>
<hwXQoSPortQueueStatisticsTotalDiscardBytes>
<name>TotalDiscardBytes</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.8</oid>
</hwXQoSPortQueueStatisticsTotalDiscardBytes>
<hwXQoSPortQueueStatisticsDropTailDiscardPackets>
<name>DropTailDiscardPackets</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.9</oid>
</hwXQoSPortQueueStatisticsDropTailDiscardPackets>
<hwXQoSPortQueueStatisticsDropTailDiscardBytes>
<name>DropTailDiscardBytes</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.10</oid>
</hwXQoSPortQueueStatisticsDropTailDiscardBytes>
<hwXQoSPortQueueStatisticsWredDiscardPackets>
<name>WredDiscardPackets</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.11</oid>
</hwXQoSPortQueueStatisticsWredDiscardPackets>
<hwXQoSPortQueueStatisticsWredDiscardBytes>
<name>WredDiscardBytes</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.12</oid>
</hwXQoSPortQueueStatisticsWredDiscardBytes>
</fields>
</interface>
Code: Select all
Data Query Debug Information
+ Running data query [17].
+ Found type = '3' [SNMP Query].
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/hwXQoSPortQueueStatisticsTable.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.2011.5.25.32.4.1.1.31.1.1' Index Count: 352
+ Index found at OID: 'iso.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1.6.2.1' value: '6'
+ Index found at OID: 'iso.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1.6.2.2' value: '6'
+ Index found at OID: 'iso.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1.6.2.3' value: '6'
+ Index found at OID: 'iso.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1.6.2.4' value: '6'
+ Index found at OID: 'iso.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1.6.2.5' value: '6'
+ Index found at OID: 'iso.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1.6.2.6' value: '6'
+ Index found at OID: 'iso.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1.6.2.7' value: '6'
+ Index found at OID: 'iso.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1.6.2.8' value: '6'
+ Index found at OID: 'iso.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1.7.2.1' value: '7'
+ Index found at OID: 'iso.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1.7.2.2' value: '7'
+ Index found at OID: 'iso.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1.7.2.3' value: '7'
+ Index found at OID: 'iso.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1.7.2.4' value: '7'
+ Index found at OID: 'iso.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1.7.2.5' value: '7'
+ Index found at OID: 'iso.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1.7.2.6' value: '7'
+ Index found at OID: 'iso.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1.7.2.7' value: '7'
+ Index found at OID: 'iso.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1.7.2.8' value: '7'
...
+ index_parse at OID: 'iso.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1.6.2.1' results: '6.2.1'
+ index_parse at OID: 'iso.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1.6.2.2' results: '6.2.2'
+ index_parse at OID: 'iso.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1.6.2.3' results: '6.2.3'
+ index_parse at OID: 'iso.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1.6.2.4' results: '6.2.4'
+ index_parse at OID: 'iso.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1.6.2.5' results: '6.2.5'
+ index_parse at OID: 'iso.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1.6.2.6' results: '6.2.6'
+ index_parse at OID: 'iso.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1.6.2.7' results: '6.2.7'
+ index_parse at OID: 'iso.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1.6.2.8' results: '6.2.8'
+ index_parse at OID: 'iso.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1.7.2.1' results: '7.2.1'
+ index_parse at OID: 'iso.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1.7.2.2' results: '7.2.2'
+ index_parse at OID: 'iso.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1.7.2.3' results: '7.2.3'
+ index_parse at OID: 'iso.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1.7.2.4' results: '7.2.4'
+ index_parse at OID: 'iso.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1.7.2.5' results: '7.2.5'
+ index_parse at OID: 'iso.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1.7.2.6' results: '7.2.6'
+ index_parse at OID: 'iso.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1.7.2.7' results: '7.2.7'
+ index_parse at OID: 'iso.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1.7.2.8' results: '7.2.8'
...
+ Inserting index data for field 'qosIndex' [value='6.2.1']
+ Inserting index data for field 'qosIndex' [value='6.2.2']
+ Inserting index data for field 'qosIndex' [value='6.2.3']
+ Inserting index data for field 'qosIndex' [value='6.2.4']
+ Inserting index data for field 'qosIndex' [value='6.2.5']
+ Inserting index data for field 'qosIndex' [value='6.2.6']
+ Inserting index data for field 'qosIndex' [value='6.2.7']
+ Inserting index data for field 'qosIndex' [value='6.2.8']
+ Inserting index data for field 'qosIndex' [value='7.2.1']
+ Inserting index data for field 'qosIndex' [value='7.2.2']
+ Inserting index data for field 'qosIndex' [value='7.2.3']
+ Inserting index data for field 'qosIndex' [value='7.2.4']
+ Inserting index data for field 'qosIndex' [value='7.2.5']
+ Inserting index data for field 'qosIndex' [value='7.2.6']
+ Inserting index data for field 'qosIndex' [value='7.2.7']
+ Inserting index data for field 'qosIndex' [value='7.2.8']
...
+ Located input field 'hwXQoSPortQueueStatisticsInterfaceIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.1'
+ Found item [hwXQoSPortQueueStatisticsInterfaceIndex='6'] index: 6.2.1 [from value]
+ Found item [hwXQoSPortQueueStatisticsInterfaceIndex='6'] index: 6.2.2 [from value]
+ Found item [hwXQoSPortQueueStatisticsInterfaceIndex='6'] index: 6.2.3 [from value]
+ Found item [hwXQoSPortQueueStatisticsInterfaceIndex='6'] index: 6.2.4 [from value]
+ Found item [hwXQoSPortQueueStatisticsInterfaceIndex='6'] index: 6.2.5 [from value]
+ Found item [hwXQoSPortQueueStatisticsInterfaceIndex='6'] index: 6.2.6 [from value]
+ Found item [hwXQoSPortQueueStatisticsInterfaceIndex='6'] index: 6.2.7 [from value]
+ Found item [hwXQoSPortQueueStatisticsInterfaceIndex='6'] index: 6.2.8 [from value]
+ Found item [hwXQoSPortQueueStatisticsInterfaceIndex='7'] index: 7.2.1 [from value]
+ Found item [hwXQoSPortQueueStatisticsInterfaceIndex='7'] index: 7.2.2 [from value]
+ Found item [hwXQoSPortQueueStatisticsInterfaceIndex='7'] index: 7.2.3 [from value]
+ Found item [hwXQoSPortQueueStatisticsInterfaceIndex='7'] index: 7.2.4 [from value]
+ Found item [hwXQoSPortQueueStatisticsInterfaceIndex='7'] index: 7.2.5 [from value]
+ Found item [hwXQoSPortQueueStatisticsInterfaceIndex='7'] index: 7.2.6 [from value]
+ Found item [hwXQoSPortQueueStatisticsInterfaceIndex='7'] index: 7.2.7 [from value]
+ Found item [hwXQoSPortQueueStatisticsInterfaceIndex='7'] index: 7.2.8 [from value]
...
+ Located input field 'hwXQoSPortQueueStatisticsQueueIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.2011.5.25.32.4.1.1.31.1.3'
+ Found item [hwXQoSPortQueueStatisticsQueueIndex='1'] index: 6.2.1 [from value]
+ Found item [hwXQoSPortQueueStatisticsQueueIndex='2'] index: 6.2.2 [from value]
+ Found item [hwXQoSPortQueueStatisticsQueueIndex='3'] index: 6.2.3 [from value]
+ Found item [hwXQoSPortQueueStatisticsQueueIndex='4'] index: 6.2.4 [from value]
+ Found item [hwXQoSPortQueueStatisticsQueueIndex='5'] index: 6.2.5 [from value]
+ Found item [hwXQoSPortQueueStatisticsQueueIndex='6'] index: 6.2.6 [from value]
+ Found item [hwXQoSPortQueueStatisticsQueueIndex='7'] index: 6.2.7 [from value]
+ Found item [hwXQoSPortQueueStatisticsQueueIndex='8'] index: 6.2.8 [from value]
+ Found item [hwXQoSPortQueueStatisticsQueueIndex='1'] index: 7.2.1 [from value]
+ Found item [hwXQoSPortQueueStatisticsQueueIndex='2'] index: 7.2.2 [from value]
+ Found item [hwXQoSPortQueueStatisticsQueueIndex='3'] index: 7.2.3 [from value]
+ Found item [hwXQoSPortQueueStatisticsQueueIndex='4'] index: 7.2.4 [from value]
+ Found item [hwXQoSPortQueueStatisticsQueueIndex='5'] index: 7.2.5 [from value]
+ Found item [hwXQoSPortQueueStatisticsQueueIndex='6'] index: 7.2.6 [from value]
+ Found item [hwXQoSPortQueueStatisticsQueueIndex='7'] index: 7.2.7 [from value]
+ Found item [hwXQoSPortQueueStatisticsQueueIndex='8'] index: 7.2.8 [from value]
I can provide the template, if it is running very well.
Kulga