Cisco QoS class (snmp_cisco_qos)
Reads one class of a Cisco service policy (class-based QoS) on one interface and direction, from CISCO-CLASS-BASED-QOS-MIB: how much traffic the class was offered, how much it sent on, how much it dropped, the share dropped, and the rate of dropped packets. Use it to see whether a voice or video class is being dropped, or whether a policer or shaper is cutting a class.
The MIB numbers the policies and the objects in them on the device, and the numbers change whenever the policy is edited. The sensor is therefore given names: the interface (as ifName or ifDescr spell it), the direction and the class map. It finds the numbers again on every poll, so an edited policy does not break it.
What it looks like

The sensor's page after a few polls, reading the VOICE class of a made-up router (see Verification). In the dark theme: the sensor's page. The form for adding it, with its parameters filled in: light, dark.
Channels
| Key | Name | Unit | Default limits |
|---|---|---|---|
pre_policy_bps | Offered traffic | bit/s | none |
post_policy_bps | Traffic sent | bit/s | none |
drop_bps | Dropped traffic | bit/s | none |
drop_pct | Dropped share | % | none |
dropped_packets_ps | Dropped packets | packets/s | none |
no_buffer_drops_ps | Drops for lack of buffers | packets/s | none |
The three bit rates are the device's own (it averages them over its own interval, 90 seconds by default), so they are there from the first poll. The packet rates are worked out from the device's 64-bit counters between two polls (32-bit where there are no others), so they are unknown for the first poll and after a counter reset. A rate of a counter the device does not have is unknown. The bit rates are 32-bit objects: on a class that carries more than 4 Gbit/s they wrap, and the drop share is unreliable. There are no default limits, because a class that drops under load is often what the policy is for. Set a limit on drop_pct for the classes that must not drop, such as voice.
Parameters
| Parameter | Default | Meaning |
|---|---|---|
interface | required | The interface the policy is attached to, as ifName or ifDescr spell it, for example GigabitEthernet0/1. |
direction | output | input or output: where the policy is attached. |
class | required | The class map, for example VOICE or class-default. A name that differs only in case is accepted. When the name appears more than once in a hierarchical policy, the outermost is read and the message says so. |
port | 161 | UDP port of the SNMP agent. |
Suggested interval: 60 seconds. Credential: SNMP. Discovery does not add this sensor, because which classes matter is a decision for you.
On the target
SNMP switched on, with a read-only community or a v3 user whose view includes 1.3.6.1.4.1.9.9.166, and a service policy attached to the interface (service-policy output <name>). IOS, IOS XE and some other Cisco software serve the MIB; check with show policy-map interface that the class has counters.
Failures
| Message | Meaning |
|---|---|
the device has no interface named "..." (kind protocol) | The name is not an ifName or ifDescr of the device. |
... has no service policy in the output direction, or the device does not offer CISCO-CLASS-BASED-QOS-MIB | No policy there, or the MIB is not served (or the view hides it). |
the output policy on ... has no class "...": its classes are: ... | The class is not in the policy; the message lists those that are. |
the device lists class "..." but has no statistics for it yet | The class exists but has no counters. |
| SNMP errors | As for snmp_interface. |
Verification
Not verified against a Cisco device. The simulator the SNMP sensors are checked against has no recording of a device that serves CISCO-CLASS-BASED-QOS-MIB: its Cisco recordings are small-business switches, wireless controllers and access points. The tests answer the objects from an agent built from the MIB's definitions: a policy on two interfaces, class maps with names, statistics with rates and 64-bit counters, the counters moving between two polls, a missing interface, direction, class and statistics, and two interfaces of one name. The object identifiers and the table layout were taken from the MIB with the MIB reader. The picture above is of a simulated device with a recording written for this purpose from the MIB, not of a router. Check the sensor against show policy-map interface before relying on it.