CBQoS/QoS graphs are empty for Cisco Catalyst 3850 (IOS-XE)

Hello,

I am experiencing an issue with empty QoS graphs for a Cisco Catalyst 3850 switch (running IOS-XE 16.12.13) in LibreNMS (version 26.11.0-dev).

The ‘qos’ discovery module successfully parses the CBQoS policy-map hierarchy (e.g., QOS_1P7Q3T) and populates the database with correct OID mapping indexes.

During the poller run, the switch returns ‘0’ for cbQosCMPrePolicyByte64 / cbQosCMPostPolicyByte64 counters. However, the switch successfully returns real, non-zero data for queue drops via the ‘cbQosCMDropPkt64’ counter (e.g., millions of dropped packets recorded in the poller output debug).

The problem is that the Web UI shows completely empty/blank QoS graphs (No Data) for these ports, likely because the default view relies on the empty pre/post policy byte counters and does not fallback or render the drop counters properly.

Is there a known patch, specific RRD/graph template tweak, or a hidden configuration option in the modern ‘qos’ module to force LibreNMS to display the QoS Drop graphs when byte counters are returning zeros?

Thank you!

generally “patches” just go in to LibreNMS.

You didn’t really give enough info to figure out what issue you are having. Can you post lnms device:poll -m qos -vv <device> output?

Good morning! I’ve executed the command and attached the log.

debug_log

Hello,

I had the same issue here. Please find below my solution :

Fix missing Cisco CBQoS device graph templates

Description

Fixes missing graph templates for Cisco Class-Based QoS (CBQoS) when QoS policies are displayed at the device level.

The QoS component generates graph types such as:

device_qos_cisco_cbqos_prebits
device_qos_cisco_cbqos_postbits
device_qos_cisco_cbqos_qosdrops
device_qos_cisco_cbqos_prepkts
device_qos_cisco_cbqos_droppkts
device_qos_cisco_cbqos_bufferdrops

However, the corresponding graph templates currently exist only under includes/html/graphs/port/.

As a result, device-level Cisco CBQoS views display template missing instead of traffic and drop graphs.

Changes

Add six device-level graph templates that reuse the existing Cisco CBQoS port graph implementations:

  • Pre-policy traffic

  • Post-policy traffic

  • Traffic drops

  • Pre-policy packets

  • Packet drops

  • No-buffer drops

The changes reuse the existing graph rendering logic and QoS RRD data sources.

No changes to SNMP polling, discovery, database schemas or RRD data collection are required.

Root cause

The QoS component selects its graph prefix based on whether a port ID is provided:

$this->typePrefix = is_null($portId) ? 'device_qos_' : 'port_qos_';

When a QoS policy is rendered without a port context, the application requests a device-level graph template that does not exist for Cisco CBQoS.

Testing

Environment

  • LibreNMS 26.10.2

  • Cisco IOS-XE 17.3.5

  • SNMPv3

  • QoS discovery enabled

  • QoS polling enabled

Verification

  • Confirmed successful Cisco CBQoS discovery.

  • Confirmed non-zero SNMP CBQoS counters.

  • Confirmed existing RRD data.

  • Reproduced device_qos_cisco_cbqos_prebits template missing.

  • Added a device-level wrapper for the existing pre-policy graph template.

  • Verified successful rendering of the pre-policy graph, including historical data.

  • Added the remaining five wrappers and confirmed that the QoS graphs render correctly.

  • Validated PHP syntax of all six files.

Expected behavior

Device-level Cisco CBQoS policies should display their traffic, packet and drop graphs without template missing errors.

Compatibility

The patch reuses the existing Cisco CBQoS graph implementations to avoid duplicating graph rendering logic.

No change to port-level CBQoS graph templates is intended.

Additional notes

This fix was validated on a LibreNMS 26.10.2 installation monitoring a Cisco IOS-XE device.

Maintainer feedback is welcome.

This is how the port statistics are currently displayed.