Cisco Port QOS polling: 3 level index

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
geertn444
Posts: 44
Joined: Fri Dec 02, 2005 3:24 am

Cisco Port QOS polling: 3 level index

Post by geertn444 »

Hi all,

I want to poll the Cisco Port QOS Table. The table is at OID 1.3.6.1.4.1.9.9.189.1.3.2.1

I am interested in index 7, which is cportQosDropPkts (7),
so OID equals: 1.3.6.1.4.1.9.9.189.1.3.2.1.7

However, it has a 3-level index:
first index: ifIndex (a number)
second index: QOSDirection (1=in, 2=out)
third index: QOSIndex (this is a simple number, most of the time = 1)

So the table looks like:
1.3.6.1.4.1.9.9.189.1.3.2.1.7.10001.1.1 = 0
1.3.6.1.4.1.9.9.189.1.3.2.1.7.10001.2.1 = 10
1.3.6.1.4.1.9.9.189.1.3.2.1.7.10002.1.1 = 0
1.3.6.1.4.1.9.9.189.1.3.2.1.7.10002.2.1 = 5
1.3.6.1.4.1.9.9.189.1.3.2.1.7.10003.1.1 = 0
1.3.6.1.4.1.9.9.189.1.3.2.1.7.10003.2.1 = 1

Since the switch doesn't keep any statistics for inbound direction (xxxx.7.ifIndex.1.z) these values are all 0. I am only interested in the outbound direction (xxxx.7.ifIndex.2.z) values.

How to put this in an XML poll file ?
(of course, the number of ifIndex can change from switch to switch)

regards,
Geert
_________________
| Cacti 0.8.6i with Plugin Architecture | Plugins: Monitor, Thresholds, Wheathermap
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Have you read through http://docs.cacti.net/ for instructions ?
geertn444
Posts: 44
Joined: Fri Dec 02, 2005 3:24 am

Post by geertn444 »

The documentation doesn't say anything about multi-level indexes (2-level or 3-level)
_________________
| Cacti 0.8.6i with Plugin Architecture | Plugins: Monitor, Thresholds, Wheathermap
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Guess not, since it's an advanced topic. Basically, you're going to need to use a REGEX to split off the OID's you want to create a subindex. Looks like it's going to be ifIndex.A.B for the device.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

I suppose, that http://docs.cacti.net/howto:data_query_ ... _not_exist should give you a clue. Don't know who gave me that documentation ...
Reinhard
WeAreGray
Posts: 10
Joined: Sun Feb 06, 2011 7:19 pm

Re: Cisco Port QOS polling: 3 level index

Post by WeAreGray »

Do you ever get this working? I am looking at graphing this and starting from somewhere would be nice.

Thanks
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Cisco Port QOS polling: 3 level index

Post by gandalf »

Did you follow the hint I provided above?
Then, please ask what you're still missing.
R.
WeAreGray
Posts: 10
Joined: Sun Feb 06, 2011 7:19 pm

Re: Cisco Port QOS polling: 3 level index

Post by WeAreGray »

I have worked on this some and I am at a loss. I am now trying a different OID in the same MIB. On the 3750 that I am running this against, each port has 12 different entries. (4 queues x 3 thresholds per queue). I have a regex that will return three values (e.g. 10101.1.1), but that will generate 12 graphs per port. Below is the XML, and an edited (for length) verbose query.

Code: Select all

CISCO-PORT-QOS-MIB::cportQosQueueEnqueuePkts.10101.1.1 = Counter64: 2 Packets
CISCO-PORT-QOS-MIB::cportQosQueueEnqueuePkts.10101.1.2 = Counter64: 0 Packets
CISCO-PORT-QOS-MIB::cportQosQueueEnqueuePkts.10101.1.3 = Counter64: 223574649 Packets
CISCO-PORT-QOS-MIB::cportQosQueueEnqueuePkts.10101.2.1 = Counter64: 9 Packets
CISCO-PORT-QOS-MIB::cportQosQueueEnqueuePkts.10101.2.2 = Counter64: 10415 Packets
CISCO-PORT-QOS-MIB::cportQosQueueEnqueuePkts.10101.2.3 = Counter64: 3205017077 Packets
CISCO-PORT-QOS-MIB::cportQosQueueEnqueuePkts.10101.3.1 = Counter64: 0 Packets
CISCO-PORT-QOS-MIB::cportQosQueueEnqueuePkts.10101.3.2 = Counter64: 0 Packets
CISCO-PORT-QOS-MIB::cportQosQueueEnqueuePkts.10101.3.3 = Counter64: 1682326279 Packets
CISCO-PORT-QOS-MIB::cportQosQueueEnqueuePkts.10101.4.1 = Counter64: 0 Packets
CISCO-PORT-QOS-MIB::cportQosQueueEnqueuePkts.10101.4.2 = Counter64: 0 Packets
CISCO-PORT-QOS-MIB::cportQosQueueEnqueuePkts.10101.4.3 = Counter64: 527421307 Packets


<interface>
        <name>Get QoS Enqueued Packets (by queue/threshold) from CISCO-PORT-QOS-MIB</name>
        <description>Management Information Base for Network Management of TCP/IP-based internets</description>
        <oid_index>.1.3.6.1.4.1.9.9.189.1.3.5.1.3</oid_index>
        <oid_index_parse>OID/REGEXP:.*\.(([0-9]{1,})\.[0-9]{1,}\.[0-9]{1,})$</oid_index_parse>
        <index_order>Index</index_order>
        <index_order_type>alphabetic</index_order_type>

        <fields>
                <Index>
                        <name>Index</name>
                        <source>index</source>
                        <direction>input</direction>
                </Index>
        </fields>
</interface>


+ Running data query [31].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/cisco-port-qos-mib-enqueued-packets.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.9.9.189.1.3.5.1.3'
+ Index found at OID: '1.3.6.1.4.1.9.9.189.1.3.5.1.3.10101.1.1' value: '2'
+ Index found at OID: '1.3.6.1.4.1.9.9.189.1.3.5.1.3.10101.1.2' value: '0'
+ Index found at OID: '1.3.6.1.4.1.9.9.189.1.3.5.1.3.10101.1.3' value: '223839634'
+ Index found at OID: '1.3.6.1.4.1.9.9.189.1.3.5.1.3.10101.2.1' value: '9'
+ Index found at OID: '1.3.6.1.4.1.9.9.189.1.3.5.1.3.10101.2.2' value: '10449'
+ Index found at OID: '1.3.6.1.4.1.9.9.189.1.3.5.1.3.10101.2.3' value: '3919159132'
+ Index found at OID: '1.3.6.1.4.1.9.9.189.1.3.5.1.3.10101.3.1' value: '0'
+ Index found at OID: '1.3.6.1.4.1.9.9.189.1.3.5.1.3.10101.3.2' value: '0'
+ Index found at OID: '1.3.6.1.4.1.9.9.189.1.3.5.1.3.10101.3.3' value: '1682537878'
+ Index found at OID: '1.3.6.1.4.1.9.9.189.1.3.5.1.3.10101.4.1' value: '0'
+ Index found at OID: '1.3.6.1.4.1.9.9.189.1.3.5.1.3.10101.4.2' value: '0'
+ Index found at OID: '1.3.6.1.4.1.9.9.189.1.3.5.1.3.10101.4.3' value: '733760594'
+ index_parse at OID: '1.3.6.1.4.1.9.9.189.1.3.5.1.3.10101.1.1' results: '10101.1.1'
+ index_parse at OID: '1.3.6.1.4.1.9.9.189.1.3.5.1.3.10101.1.2' results: '10101.1.2'
+ index_parse at OID: '1.3.6.1.4.1.9.9.189.1.3.5.1.3.10101.1.3' results: '10101.1.3'
+ index_parse at OID: '1.3.6.1.4.1.9.9.189.1.3.5.1.3.10101.2.1' results: '10101.2.1'
+ index_parse at OID: '1.3.6.1.4.1.9.9.189.1.3.5.1.3.10101.2.2' results: '10101.2.2'
+ index_parse at OID: '1.3.6.1.4.1.9.9.189.1.3.5.1.3.10101.2.3' results: '10101.2.3'
+ index_parse at OID: '1.3.6.1.4.1.9.9.189.1.3.5.1.3.10101.3.1' results: '10101.3.1'
+ index_parse at OID: '1.3.6.1.4.1.9.9.189.1.3.5.1.3.10101.3.2' results: '10101.3.2'
+ index_parse at OID: '1.3.6.1.4.1.9.9.189.1.3.5.1.3.10101.3.3' results: '10101.3.3'
+ index_parse at OID: '1.3.6.1.4.1.9.9.189.1.3.5.1.3.10101.4.1' results: '10101.4.1'
+ index_parse at OID: '1.3.6.1.4.1.9.9.189.1.3.5.1.3.10101.4.2' results: '10101.4.2'
+ index_parse at OID: '1.3.6.1.4.1.9.9.189.1.3.5.1.3.10101.4.3' results: '10101.4.3'
+ Inserting index data for field 'Index' [value='10101.1.1']
+ Inserting index data for field 'Index' [value='10101.1.2']
+ Inserting index data for field 'Index' [value='10101.1.3']
+ Inserting index data for field 'Index' [value='10101.2.1']
+ Inserting index data for field 'Index' [value='10101.2.2']
+ Inserting index data for field 'Index' [value='10101.2.3']
+ Inserting index data for field 'Index' [value='10101.3.1']
+ Inserting index data for field 'Index' [value='10101.3.2']
+ Inserting index data for field 'Index' [value='10101.3.3']
+ Inserting index data for field 'Index' [value='10101.4.1']
+ Inserting index data for field 'Index' [value='10101.4.2']
+ Inserting index data for field 'Index' [value='10101.4.3']
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/cisco-port-qos-mib-enqueued-packets.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/cisco-port-qos-mib-enqueued-packets.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/cisco-port-qos-mib-enqueued-packets.xml'
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Cisco Port QOS polling: 3 level index

Post by gandalf »

WeAreGray wrote:I have worked on this some and I am at a loss. I am now trying a different OID in the same MIB. On the 3750 that I am running this against, each port has 12 different entries. (4 queues x 3 thresholds per queue). I have a regex that will return three values (e.g. 10101.1.1), but that will generate 12 graphs per port. Below is the XML, and an edited (for length) verbose query.
And how many did you expect/need?
Please find http://docs.cacti.net/manual:088:3a_adv ... ta_queries better explanation about available (and upcoming) options for queries
R.
WeAreGray
Posts: 10
Joined: Sun Feb 06, 2011 7:19 pm

Re: Cisco Port QOS polling: 3 level index

Post by WeAreGray »

I would like 1 graph per interface. I will look at the link, when I have a chance.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Cisco Port QOS polling: 3 level index

Post by gandalf »

But then, it's not a 3-dim index anymore. You may of course fix specific parts of the index. And at least, when selecting the index to graph, the last chance for a specific selection is given. I can't see missing features here.
R.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests