From 51c6bee98b8a4ef7aafb639fbf8619e01ea296a0 Mon Sep 17 00:00:00 2001 From: Quentin Bisson Date: Mon, 18 Mar 2024 15:39:47 +0100 Subject: [PATCH] Fix node role label (#465) * Fix node role label * Remove service-level changes * Update service-level.jsonnet --- CHANGELOG.md | 4 ++++ .../dashboards/shared/private/api-performance.json | 4 ++-- .../dashboards/shared/private/etcd-health.json | 2 +- .../dashboards/shared/public/nodes-overview.json | 4 ++-- helm/dashboards/dashboards/kvm/public/kvm-machine-usage.json | 4 ++-- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d7fb69c..ffd4684f 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] +### Fixed + +- Fix all dashboards that were only supporting only role=master to now support role=~control-plane|master. + ## [3.8.4] - 2024-03-11 ### Added diff --git a/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/api-performance.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/api-performance.json index 9b391416..6f741803 100644 --- a/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/api-performance.json +++ b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/api-performance.json @@ -1432,7 +1432,7 @@ "uid": "PBFA97CFB590B2093" }, "exemplar": true, - "expr": "100 * (1 - avg(irate(node_cpu_seconds_total{mode=\"idle\",cluster_id=\"$cluster_id\",node!=\"\"}[$__rate_interval])) by (node)) and on (node) kube_node_role{cluster_id=\"$cluster_id\",role=\"master\"}", + "expr": "100 * (1 - avg(irate(node_cpu_seconds_total{mode=\"idle\",cluster_id=\"$cluster_id\",node!=\"\"}[$__rate_interval])) by (node)) and on (node) kube_node_role{cluster_id=\"$cluster_id\",role=~\"control-plane|master\"}", "interval": "", "legendFormat": "{{ node }}", "refId": "A" @@ -1527,7 +1527,7 @@ "uid": "PBFA97CFB590B2093" }, "exemplar": true, - "expr": "(1 - sum(node_memory_MemAvailable_bytes{cluster_id=\"$cluster_id\",node!=\"\"}) by (node) / sum(node_memory_MemTotal_bytes{cluster_id=\"$cluster_id\",node!=\"\"}) by (node)) and on (node) kube_node_role{cluster_id=\"$cluster_id\",role=\"master\"}", + "expr": "(1 - sum(node_memory_MemAvailable_bytes{cluster_id=\"$cluster_id\",node!=\"\"}) by (node) / sum(node_memory_MemTotal_bytes{cluster_id=\"$cluster_id\",node!=\"\"}) by (node)) and on (node) kube_node_role{cluster_id=\"$cluster_id\",role=~\"control-plane|master\"}", "interval": "", "legendFormat": "{{ node }}", "refId": "A" diff --git a/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/etcd-health.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/etcd-health.json index 5f8906ef..8a0cefa8 100644 --- a/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/etcd-health.json +++ b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/etcd-health.json @@ -463,7 +463,7 @@ "uid": "PBFA97CFB590B2093" }, "editorMode": "code", - "expr": "process_resident_memory_bytes{cluster_id=\"$cluster_id\",role=\"master\", job=\"$cluster_id-prometheus/etcd-$cluster_id/0\"}", + "expr": "process_resident_memory_bytes{cluster_id=\"$cluster_id\",role=~\"control-plane|master\", job=\"$cluster_id-prometheus/etcd-$cluster_id/0\"}", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{instance}} Resident Memory", 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 c8d2771d..796a6ab2 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 @@ -169,7 +169,7 @@ "datasource": { "uid": "$datasource" }, - "expr": "count(kube_node_role{cluster_id=\"$cluster\",organization=~\"$organization\",role=\"master\"})", + "expr": "count(kube_node_role{cluster_id=\"$cluster\",organization=~\"$organization\",role=~\"control-plane|master\"})", "interval": "", "legendFormat": "", "refId": "A" @@ -268,7 +268,7 @@ "datasource": { "uid": "$datasource" }, - "expr": "count(kube_node_role{cluster_id=\"$cluster\",organization=~\"$organization\",role=\"master\"})", + "expr": "count(kube_node_role{cluster_id=\"$cluster\",organization=~\"$organization\",role=~\"control-plane|master\"})", "interval": "", "legendFormat": "Control plane nodes", "refId": "A" diff --git a/helm/dashboards/dashboards/kvm/public/kvm-machine-usage.json b/helm/dashboards/dashboards/kvm/public/kvm-machine-usage.json index a664689e..5d256e54 100644 --- a/helm/dashboards/dashboards/kvm/public/kvm-machine-usage.json +++ b/helm/dashboards/dashboards/kvm/public/kvm-machine-usage.json @@ -203,7 +203,7 @@ "targets": [ { "exemplar": true, - "expr": "sum(up{app=\"kubelet\", cluster_type=\"management_cluster\",role=\"master\"})", + "expr": "sum(up{app=\"kubelet\", cluster_type=\"management_cluster\",role=~\"control-plane|master\"})", "format": "time_series", "instant": true, "interval": "", @@ -2442,7 +2442,7 @@ "pluginVersion": "8.0.3", "targets": [ { - "expr": "count(up{app=\"kubelet\", cluster_type=\"workload_cluster\",role=\"master\",cluster_id=\"$cluster\"})", + "expr": "count(up{app=\"kubelet\", cluster_type=\"workload_cluster\",role=~\"control-plane|master\",cluster_id=\"$cluster\"})", "format": "time_series", "instant": true, "intervalFactor": 2,