This document describes how to extract the various values concerning Class Based QoS (Quality of Service) details (CISCO-CLASS-BASED-QOS-MIB) applied against Control Plane using SNMP (Simple Network Management Protocol).
Cisco recommends that you have:
Net-SNMP, or any similar command line based utility, running on a UNIX based operating system, for polling SNMP MIBs (Management Information Bases) from a Cisco device. Net-SNMP is a third-party open source utility available for download at http://www.net-snmp.org/.
QoS should be configured and applied on the interface(s) for which you will do SNMP polling.
The information in this document is based on these software and hardware versions:
Any Cisco IOS® device that runs 12.0(3)T or higher. The procedure in this document was verified on a Cisco 6500 that runs 12.2(33) SXJ3.
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.
Get Class Based QoS Details Applied to an Interface With SNMP
Use this procedure in order to determine or confirm the required Object Identifier (OID) for polling.
Get the ifindex (Object Identifier/OID 18.104.22.168.22.214.171.124.1.1) for the interface.
Example 1 - CLI command to get the ifindex of the interface GigabitEthernet6/1/3:
show snmp mib ifmib ifindex | include GigabitEthernet6/1/3 GigabitEthernet6/1/3: Ifindex = 73
Example 2 - SNMP command to get the ifindex of the same interface:
The highlighted values are: cbQosConfigIndex (6181089), cbQosPolicyIndex (1170), and cbQosObjectsIndex (7552545).
Important: In this example, the cbQosConfigIndex and corresponding cbQosObjectsIndex are for the cbQosObjectsType (126.96.36.199.188.8.131.52.184.108.40.206.1.3) "classmap". For any other type of cbQosObjectsType, you must look into the correlation derived under cbQosObjects as part of cbQosObjectsIndex (220.127.116.11.18.104.22.168.22.214.171.124.1.3). Refer to the definition of cbQosParentObjectsIndex.
Poll data from the Policy-map (in correlation with QosObjectsType=classmap) from cbQosClassMapStats (126.96.36.199.188.8.131.52.166.1.15). Many options are available: