feat(alloy-mixin): Add filters, groupBy, and multi-select dashboard variables#5611
Merged
Conversation
Co-authored-by: Piotr <thampiotr@users.noreply.github.com>
Co-authored-by: Piotr <thampiotr@users.noreply.github.com>
Co-authored-by: Piotr <thampiotr@users.noreply.github.com>
|
Cursor Agent can help with this pull request. Just |
Co-authored-by: Piotr <thampiotr@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Alloy mixin Grafana dashboards to improve usability and reduce expensive default queries by adding ad-hoc filters, a configurable “group by” variable, and enabling multi-select for key template variables.
Changes:
- Add Prometheus ad-hoc filters (
filters) and a “Group by” template variable (groupby) across dashboards, and update queries to aggregate by the selected dimension. - Enable multi-select for template variables (notably cluster/namespace/job/instance) and adjust defaults to reduce “query everything” behavior.
- Update dashboard behavior and panels (refresh 10s → 30s, scrape panel copy updates, WAL delay outlier filtering, OTel Engine panel fixes/visualization tweaks).
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| operations/alloy-mixin/rendered/dashboards/alloy-resources.json | Rendered Resources dashboard: groupBy aggregation, multi-select vars, refresh update, adhoc filters added. |
| operations/alloy-mixin/rendered/dashboards/alloy-prometheus-remote-write.json | Rendered Prometheus remote write dashboard: groupBy aggregation, refresh update, adhoc filters and multi-select vars, WAL delay filter tweak. |
| operations/alloy-mixin/rendered/dashboards/alloy-otel-engine-overview.json | Rendered OTel engine overview: stat/sparkline fixes, “recently started” visualization update, refresh update. |
| operations/alloy-mixin/rendered/dashboards/alloy-opentelemetry.json | Rendered OpenTelemetry dashboard: groupBy aggregation, multi-select vars, refresh update, adhoc filters added. |
| operations/alloy-mixin/rendered/dashboards/alloy-loki.json | Rendered Loki components dashboard: groupBy aggregation, multi-select vars, refresh update, adhoc filters added. |
| operations/alloy-mixin/rendered/dashboards/alloy-logs.json | Rendered logs dashboard: logs volume grouped by groupby, template variable changes, refresh update, adhoc filters added. |
| operations/alloy-mixin/rendered/dashboards/alloy-controller.json | Rendered controller dashboard: groupBy aggregation, multi-select vars, refresh update, adhoc filters added. |
| operations/alloy-mixin/rendered/dashboards/alloy-cluster-overview.json | Rendered cluster overview: groupBy aggregation, multi-select vars, refresh update, adhoc filters added. |
| operations/alloy-mixin/rendered/dashboards/alloy-cluster-node.json | Rendered cluster node: groupBy aggregation, multi-select vars, refresh update, adhoc filters added. |
| operations/alloy-mixin/dashboards/utils/templates.libsonnet | Template variable factory: adds Prometheus adhoc filters, switches key vars to multi-select, updates default-to-all behavior. |
| operations/alloy-mixin/dashboards/utils/panel.jsonnet | Panel helpers: adds withDrawStyle utility for timeseries styling. |
| operations/alloy-mixin/dashboards/utils/dashboard.jsonnet | Dashboard helpers: refresh default to 30s, adds newGroupByTemplateVariable, enhances multi var defaults. |
| operations/alloy-mixin/dashboards/resources.libsonnet | Resources dashboard source: adds groupby variable, updates queries/legends, annotation selector update. |
| operations/alloy-mixin/dashboards/prometheus.libsonnet | Prometheus remote write source: groupby support, WAL delay filter guard, URL query updated for multi-select job, template var additions. |
| operations/alloy-mixin/dashboards/otel-engine-overview.libsonnet | OTel engine source: groupby variable helper usage, pods count stat fix, adds “recently started” stacked bars panel. |
| operations/alloy-mixin/dashboards/opentelemetry.libsonnet | OpenTelemetry dashboard source: groupby variable and query aggregation updates. |
| operations/alloy-mixin/dashboards/loki.libsonnet | Loki components dashboard source: groupby variable and query aggregation updates; endpoint query updated for multi-select job. |
| operations/alloy-mixin/dashboards/controller.libsonnet | Controller dashboard source: groupby variable and query aggregation updates; annotation selector update. |
| operations/alloy-mixin/dashboards/cluster-overview.libsonnet | Cluster overview source: groupby variable and query aggregation updates; annotation selector update. |
| operations/alloy-mixin/dashboards/cluster-node.libsonnet | Cluster node source: groupby variable and query aggregation updates; annotation selector update. |
| operations/alloy-mixin/dashboards/alloy-logs.libsonnet | Logs dashboard source: introduces adhoc filters + groupby var and updates logs volume aggregation + variable defaults. |
Made-with: Cursor
kalleep
approved these changes
Mar 13, 2026
Contributor
kalleep
left a comment
There was a problem hiding this comment.
Great work, there are come comments from copilot that could be legit
Contributor
Author
|
Ah, I forgot to resolve them - I did look into them and they were addressed or not legit. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brief description of Pull Request
Alloy mixin dashboard improvements.
Pull Request Details
Issue(s) fixed by this Pull Request
Notes to the Reviewer
PR Checklist