Skip to content

Conversation

@willianpaixao
Copy link

What this PR does / why we need it

This PR adds flexibility to the cluster variable in the Node Exporter / Nodes Grafana dashboard to support environments where:

  • Some metrics may not have a cluster label
  • Users want to view metrics across all clusters
  • Multi-cluster setups with optional cluster labeling

The changes enable the dashboard to work seamlessly in environments where the cluster label may be missing or when users want to aggregate data across all clusters.

Changes made:

  • Added includeAll: true to the cluster variable configuration to enable an "All" option
  • Modified all PromQL queries to use regex matching (cluster=~"$cluster") instead of exact matching (cluster="$cluster")
  • Updated the instance variable query to support regex matching for cluster filtering

This is particularly useful for single-cluster environments where the cluster label might not be set on node-exporter metrics, or for users who want to view aggregated metrics across multiple clusters.

Which issue this PR fixes

Special notes for your reviewer

The changes are minimal and focused only on the Nodes dashboard template. All PromQL queries have been updated consistently to use regex matching. The allValue: ".*" was already present in the template, so this PR only adds the includeAll: true property to enable the UI option and updates the query operators.

Checklist

  • DCO signed
  • Chart Version bumped
  • Title of the PR starts with chart name (e.g. [kube-prometheus-stack])

Copy link
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 enhances the Node Exporter / Nodes Grafana dashboard by adding support for the "All" option in the cluster variable dropdown and updating all PromQL queries to use regex matching. This aligns the dashboard with other dashboards in the repository and enables better flexibility for multi-cluster and single-cluster environments.

  • Adds includeAll: true to the cluster variable definition to enable selection of all clusters
  • Updates all PromQL queries from exact matching (cluster="$cluster") to regex matching (cluster=~"$cluster")
  • Updates the instance variable query to use regex matching for cluster filtering

Reviewed changes

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

File Description
charts/kube-prometheus-stack/Chart.yaml Bumps chart version from 80.4.1 to 80.4.2
charts/kube-prometheus-stack/templates/grafana/dashboards-1.14/nodes.yaml Adds includeAll option and updates all queries to use regex matching for cluster variable

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…e nodes dashboard

- Some metrics may not have a cluster label
- Users want to view metrics across all clusters
- Multi-cluster setups with optional cluster labeling

Changes:
- Update cluster variable to use regex matching and support "All" option
- Modify all PromQL queries to use regex matching (=~) instead of exact
  matching (=) for the cluster label

This enables the dashboard to work in environments where the cluster label
may be missing or when users want to aggregate data across all clusters.

Signed-off-by: Willian Paixao <[email protected]>
@willianpaixao willianpaixao force-pushed the feat/nodes-dashboard-flexible-cluster branch from b505c72 to 84af2cf Compare December 22, 2025 19:12
@willianpaixao
Copy link
Author

Hi @jkroepke, I had not seen that comment. Sorry.
Here's the new PR prometheus/node_exporter#3509, will close this one.

@willianpaixao willianpaixao deleted the feat/nodes-dashboard-flexible-cluster branch December 22, 2025 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants