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.