-
Notifications
You must be signed in to change notification settings - Fork 47
fix: adding dynamic threshold of link speed in 2 network tables #4062
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
# Conflicts: # docs/ontap-metrics.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates network monitoring dashboards to use dynamic percentage-based thresholds instead of fixed absolute byte values for link speed monitoring. The change affects two network tables (NIC ports and Link Aggregation Groups) in the Grafana dashboard by introducing new percentage metrics (nic_ifgrp_rx_perc, nic_ifgrp_tx_perc, nic_rx_percent, nic_tx_percent) and updating the visualization thresholds to use percentage mode with configurable warning levels (50%, 75%, 90%).
Key changes:
- Added new percentage-based metrics for network interface group receive/transmit bandwidth utilization
- Updated Grafana dashboard to display bandwidth usage as percentages with dynamic thresholds
- Modified backend collectors to calculate and populate percentage metrics for port aggregation groups
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| mcp/metadata/ontap_metrics.json | Added metric definitions for nic_ifgrp_rx_perc and nic_ifgrp_tx_perc |
| grafana/dashboards/cmode/network.json | Updated dashboard configuration to include percentage-based visualizations with dynamic thresholds, added new query references for percentage metrics, and reorganized column ordering |
| docs/ontap-metrics.md | Added documentation for the new percentage metrics including API endpoints and Grafana dashboard references |
| cmd/tools/generate/counter.yaml | Added counter definitions for nic_ifgrp_rx_perc and nic_ifgrp_tx_perc metrics |
| cmd/collectors/zapiperf/plugins/nic/nic.go | Extended PortData population to include percentage values for read/write operations |
| cmd/collectors/restperf/plugins/nic/nic.go | Extended PortData population to include percentage values for read/write operations |
| cmd/collectors/commonutils.go | Added ReadPerc and WritePerc fields to PortData struct and updated aggregation logic to sum percentage values |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| rxp := nData.GetMetric("rx_perc") | ||
| rxpv, _ := rxp.GetValueFloat64(ifgroupInstance) | ||
| rxp.SetValueFloat64(ifgroupInstance, readPerc+rxpv) | ||
|
|
||
| txp := nData.GetMetric("tx_perc") | ||
| txpv, _ := txp.GetValueFloat64(ifgroupInstance) | ||
| txp.SetValueFloat64(ifgroupInstance, writePerc+txpv) |
Copilot
AI
Dec 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summing percentage values across ports in an aggregation group produces incorrect results. Percentages should be averaged or the maximum taken, not summed. For example, if two ports are each at 50% utilization, summing them would incorrectly report 100% instead of the actual 50% average or 50% max utilization.


No description provided.