-
Notifications
You must be signed in to change notification settings - Fork 0
Fixed download speed alert query #6
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
Conversation
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 fixes a download speed alert query in Grafana Cloud by changing Query B from a "reduce" operation to a "threshold" evaluation. The change aims to properly evaluate whether the download speed falls below the configured threshold (63 Mbps) and includes detailed inline comments explaining the query logic.
Key changes:
- Changed Query B type from "reduce" to "threshold" for proper condition evaluation
- Updated
query.paramsfrom empty array to["A"]to reference Query A - Added comprehensive inline comments explaining the threshold evaluation logic
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| expression = "A" | ||
| reducer = "last" | ||
| expression = "A" # Input: Query A (the speed metric) | ||
| reducer = "last" # Take the most recent value |
Copilot
AI
Nov 26, 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.
The configuration has reducer = "last" at the top level (line 177) combined with type = "threshold" (line 179). In Grafana's unified alerting, the threshold type uses a classic condition format where the reducer is specified within the conditions[].reducer block (lines 192-195), not at the top level. The top-level reducer field should be removed when using type = "threshold", as it conflicts with the threshold expression format.
| reducer = "last" # Take the most recent value |
|
|
||
| # Query B: Threshold check | ||
| # Query B: Check if speed < threshold | ||
| # This reduces Query A to the last value and evaluates: is it < 63? |
Copilot
AI
Nov 26, 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.
The comment states "This reduces Query A to the last value" but the query type is now "threshold", not "reduce". The threshold type evaluates a condition (in this case, whether the value is less than the threshold). Consider updating the comment to: "This evaluates if Query A's last value is below the threshold" to accurately reflect what a threshold query does.
| # This reduces Query A to the last value and evaluates: is it < 63? | |
| # This evaluates if Query A's last value is below the threshold (63 Mbps) |
No description provided.