Skip to content

feat(alloy-mixin): Add filters, groupBy, and multi-select dashboard variables#5611

Merged
thampiotr merged 12 commits into
mainfrom
cursor/alloy-dashboards-templates-2b10
Mar 13, 2026
Merged

feat(alloy-mixin): Add filters, groupBy, and multi-select dashboard variables#5611
thampiotr merged 12 commits into
mainfrom
cursor/alloy-dashboards-templates-2b10

Conversation

@thampiotr
Copy link
Copy Markdown
Contributor

@thampiotr thampiotr commented Feb 20, 2026

Brief description of Pull Request

Alloy mixin dashboard improvements.

Pull Request Details

  • Add ad-hoc filters and groupBy template variable to all dashboards
  • Enable multi-select for cluster, namespace, and job variables
  • Cluster and namespace default to first value instead of "All" (with custom value support); job and instance keep "All" as default. This is to avoid huge queries by default when you open the dash.
  • Change default dashboard refresh rate from 10s to 30s. Most users are on 1DPM.
  • Fix scrape panel titles and descriptions to not reference $cluster and to match actual query selectors
  • Filter WAL delay outliers caused by zero-value timestamps (< 31536000 > 0)
  • Fix OTel Engine pods count sparkline (was instant query + graphMode none)
  • Make OTel Engine "recently started" panel a stacked bar chart to be easier to read.

Issue(s) fixed by this Pull Request

Notes to the Reviewer

PR Checklist

  • Documentation added
  • Tests updated
  • Config converters updated

thampiotr and others added 3 commits February 20, 2026 10:57
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
Copy link
Copy Markdown

cursor Bot commented Feb 20, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

Co-authored-by: Piotr <thampiotr@users.noreply.github.com>
@thampiotr thampiotr changed the title Alloy dashboards templates feat(alloy-mixin): Add filters, groupBy, and multi-select dashboard variables Feb 20, 2026
thampiotr and others added 3 commits February 25, 2026 14:13
Co-authored-by: Cursor <cursoragent@cursor.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 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.

Comment thread operations/alloy-mixin/dashboards/alloy-logs.libsonnet Outdated
Comment thread operations/alloy-mixin/dashboards/alloy-logs.libsonnet
Comment thread operations/alloy-mixin/dashboards/prometheus.libsonnet
@thampiotr thampiotr requested a review from Copilot March 12, 2026 15:23
@thampiotr thampiotr marked this pull request as ready for review March 12, 2026 15:23
@thampiotr thampiotr requested a review from a team as a code owner March 12, 2026 15:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 21 changed files in this pull request and generated 2 comments.

Comment thread operations/alloy-mixin/dashboards/otel-engine-overview.libsonnet
Comment thread operations/alloy-mixin/dashboards/controller.libsonnet Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 21 changed files in this pull request and generated 2 comments.

Comment thread operations/alloy-mixin/dashboards/loki.libsonnet
Comment thread operations/alloy-mixin/dashboards/otel-engine-overview.libsonnet
Copy link
Copy Markdown
Contributor

@kalleep kalleep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, there are come comments from copilot that could be legit

@thampiotr
Copy link
Copy Markdown
Contributor Author

Ah, I forgot to resolve them - I did look into them and they were addressed or not legit.

@thampiotr thampiotr merged commit 3ef714e into main Mar 13, 2026
50 checks passed
@thampiotr thampiotr deleted the cursor/alloy-dashboards-templates-2b10 branch March 13, 2026 13:24
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Mar 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants