From 8358f29b8adc12faa8a810ed4a32f66cf435ce26 Mon Sep 17 00:00:00 2001 From: Fernando Ripoll Date: Mon, 23 Dec 2024 09:12:36 +0100 Subject: [PATCH] Update "Nodes Overview" dashboard to avoid CP doubble count (#650) * Etcd count dashboard fix with exported namespace * Add changelog entry * Add label_replace to work with new and old label name * Update "Nodes Overview" dashboard to avoid CP doubble count * Add changelog entry --- CHANGELOG.md | 4 ++++ .../dashboards/shared/public/nodes-overview.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fdd4b00f..e9312d85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- Fixed nodes overview dashboard to avoid master duplicating numbers. + ## [3.26.1] - 2024-11-12 ### Added diff --git a/helm/dashboards/charts/public_dashboards/dashboards/shared/public/nodes-overview.json b/helm/dashboards/charts/public_dashboards/dashboards/shared/public/nodes-overview.json index 6fbc5935..0daf0221 100644 --- a/helm/dashboards/charts/public_dashboards/dashboards/shared/public/nodes-overview.json +++ b/helm/dashboards/charts/public_dashboards/dashboards/shared/public/nodes-overview.json @@ -238,7 +238,7 @@ "type": "prometheus", "uid": "$datasource" }, - "expr": "count(kube_node_role{cluster_id=\"$cluster\",organization=~\"$organization\",role=~\"control-plane|master\"})", + "expr": "count(count(kube_node_role{cluster_id=\"$cluster\",organization=~\"$organization\",role=~\"control-plane|master\"}) by (node))", "interval": "", "legendFormat": "Control plane nodes", "refId": "A"