From 7ea49ad4d3b3f5c3d4fd1739bce26677b4dd4355 Mon Sep 17 00:00:00 2001 From: Herve Nicol <12008875+hervenicol@users.noreply.github.com> Date: Wed, 6 Nov 2024 05:34:53 +0100 Subject: [PATCH] fix Management cluster Overview dashboard --- CHANGELOG.md | 4 + .../private/management-cluster-overview.json | 110 ++++++++++++++---- 2 files changed, 90 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be614754..7049d01b 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 + +- Fixed "Management cluster Overview" dashboard + ## [3.26.0] - 2024-10-30 ### Changed diff --git a/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/management-cluster-overview.json b/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/management-cluster-overview.json index 28aa07d7..331e30ec 100644 --- a/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/management-cluster-overview.json +++ b/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/management-cluster-overview.json @@ -48,6 +48,8 @@ }, { "datasource": { + "default": false, + "type": "prometheus", "uid": "$datasource" }, "fieldConfig": { @@ -96,6 +98,7 @@ "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "mean" @@ -107,17 +110,19 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "10.4.0", + "pluginVersion": "11.2.1", "targets": [ { "datasource": { "uid": "$datasource" }, - "expr": "count(count(kube_pod_labels{cluster_type=~\"management_cluster\",label_app=~\".+\"}) by (label_app))", + "editorMode": "code", + "expr": "count(count(kube_pod_labels{cluster_type=~\"management_cluster\",label_app_kubernetes_io_name=~\".+\"}) by (label_app_kubernetes_io_name))", "format": "table", "interval": "", "intervalFactor": 1, "legendFormat": "CPU", + "range": true, "refId": "A" } ], @@ -126,6 +131,8 @@ }, { "datasource": { + "default": false, + "type": "prometheus", "uid": "$datasource" }, "fieldConfig": { @@ -134,6 +141,7 @@ "mode": "thresholds" }, "custom": { + "align": "auto", "cellOptions": { "type": "auto" }, @@ -195,13 +203,14 @@ }, "showHeader": true }, - "pluginVersion": "10.4.0", + "pluginVersion": "11.2.1", "targets": [ { "datasource": { "uid": "$datasource" }, - "expr": "count(kube_pod_labels{cluster_type=~\"management_cluster\",label_app=~\".+\"}) by (label_app)", + "editorMode": "code", + "expr": "count(kube_pod_labels{cluster_type=~\"management_cluster\",label_app_kubernetes_io_name=~\".+\"}) by (label_app_kubernetes_io_name)", "format": "table", "instant": true, "interval": "", @@ -224,6 +233,8 @@ }, { "datasource": { + "default": false, + "type": "prometheus", "uid": "$datasource" }, "fieldConfig": { @@ -272,6 +283,7 @@ "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "mean" @@ -283,15 +295,17 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "10.4.0", + "pluginVersion": "11.2.1", "targets": [ { "datasource": { "uid": "$datasource" }, - "expr": "sum(kube_pod_container_resource_requests_cpu_cores{cluster_type=~\"management_cluster\"})", + "editorMode": "code", + "expr": "sum(aggregation:kubernetes:pod_resource_requests_cpu_cores{cluster_type=~\"management_cluster\"})", "format": "time_series", "intervalFactor": 1, + "range": true, "refId": "A" } ], @@ -300,6 +314,8 @@ }, { "datasource": { + "default": false, + "type": "prometheus", "uid": "$datasource" }, "fieldConfig": { @@ -348,6 +364,7 @@ "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "mean" @@ -359,15 +376,17 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "10.4.0", + "pluginVersion": "11.2.1", "targets": [ { "datasource": { "uid": "$datasource" }, - "expr": "sum(kube_pod_container_resource_limits_cpu_cores{cluster_type=~\"management_cluster\"})", + "editorMode": "code", + "expr": "sum(aggregation:kubernetes:pod_resource_limits_cpu_cores{cluster_type=~\"management_cluster\"})", "format": "time_series", "intervalFactor": 1, + "range": true, "refId": "A" } ], @@ -376,6 +395,8 @@ }, { "datasource": { + "default": false, + "type": "prometheus", "uid": "$datasource" }, "fieldConfig": { @@ -424,6 +445,7 @@ "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "mean" @@ -435,15 +457,17 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "10.4.0", + "pluginVersion": "11.2.1", "targets": [ { "datasource": { "uid": "$datasource" }, - "expr": "sum(kube_node_status_allocatable_cpu_cores{cluster_type=~\"management_cluster\"})", + "editorMode": "code", + "expr": "sum(aggregation:kubernetes:node_allocatable_cpu_cores_total{cluster_type=~\"management_cluster\"})", "format": "time_series", "intervalFactor": 1, + "range": true, "refId": "A" } ], @@ -452,6 +476,8 @@ }, { "datasource": { + "default": false, + "type": "prometheus", "uid": "$datasource" }, "fieldConfig": { @@ -483,7 +509,7 @@ } ] }, - "unit": "decgbytes" + "unit": "decbytes" }, "overrides": [] }, @@ -500,6 +526,7 @@ "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "mean" @@ -511,15 +538,17 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "10.4.0", + "pluginVersion": "11.2.1", "targets": [ { "datasource": { "uid": "$datasource" }, - "expr": "sum(kube_pod_container_resource_requests_memory_bytes{cluster_type=~\"management_cluster\"}/(1024*1024*1024))", + "editorMode": "code", + "expr": "sum(aggregation:kubernetes:pod_resource_requests_memory_bytes{cluster_type=~\"management_cluster\"})", "format": "time_series", "intervalFactor": 1, + "range": true, "refId": "A" } ], @@ -528,6 +557,8 @@ }, { "datasource": { + "default": false, + "type": "prometheus", "uid": "$datasource" }, "fieldConfig": { @@ -559,7 +590,7 @@ } ] }, - "unit": "decgbytes" + "unit": "decbytes" }, "overrides": [] }, @@ -576,6 +607,7 @@ "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "mean" @@ -587,15 +619,17 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "10.4.0", + "pluginVersion": "11.2.1", "targets": [ { "datasource": { "uid": "$datasource" }, - "expr": "sum(kube_pod_container_resource_limits_memory_bytes{cluster_type=~\"management_cluster\"}/(1024*1024*1024))\n", + "editorMode": "code", + "expr": "sum(aggregation:kubernetes:pod_resource_limits_memory_bytes{cluster_type=~\"management_cluster\"})\n", "format": "time_series", "intervalFactor": 1, + "range": true, "refId": "A" } ], @@ -604,6 +638,8 @@ }, { "datasource": { + "default": false, + "type": "prometheus", "uid": "$datasource" }, "fieldConfig": { @@ -635,7 +671,7 @@ } ] }, - "unit": "decgbytes" + "unit": "decbytes" }, "overrides": [] }, @@ -652,6 +688,7 @@ "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "mean" @@ -663,15 +700,17 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "10.4.0", + "pluginVersion": "11.2.1", "targets": [ { "datasource": { "uid": "$datasource" }, - "expr": "sum(kube_node_status_allocatable_memory_bytes{cluster_type=~\"management_cluster\"}/(1024*1024*1024))", + "editorMode": "code", + "expr": "sum(aggregation:kubernetes:node_allocatable_memory_bytes{cluster_type=~\"management_cluster\"})", "format": "time_series", "intervalFactor": 1, + "range": true, "refId": "A" } ], @@ -706,6 +745,8 @@ }, { "datasource": { + "default": false, + "type": "prometheus", "uid": "$datasource" }, "fieldConfig": { @@ -720,6 +761,7 @@ "axisLabel": "seconds / 5 minutes", "axisPlacement": "auto", "barAlignment": 0, + "barWidthFactor": 0.6, "drawStyle": "line", "fillOpacity": 10, "gradientMode": "none", @@ -831,12 +873,27 @@ "datasource": { "uid": "$datasource" }, - "expr": "sort_desc(sum(\n rate(container_cpu_cfs_throttled_seconds_total{cluster_type=~\"management_cluster\",container!~\"\"}[5m])) \nby (container))\n", + "editorMode": "code", + "expr": "sum(\n rate(container_cpu_cfs_throttled_periods_total{cluster_type=~\"management_cluster\",container!~\"\"}[5m])) \nby (container)", "format": "time_series", "interval": "", "intervalFactor": 1, "legendFormat": "{{ container }}", + "range": true, "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "expr": "", + "hide": false, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "B" } ], "title": "Throttled CPU per container", @@ -845,6 +902,8 @@ }, { "datasource": { + "default": false, + "type": "prometheus", "uid": "$datasource" }, "fieldConfig": { @@ -859,6 +918,7 @@ "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, + "barWidthFactor": 0.6, "drawStyle": "line", "fillOpacity": 10, "gradientMode": "none", @@ -898,7 +958,7 @@ } ] }, - "unit": "short" + "unit": "decbytes" }, "overrides": [ { @@ -961,7 +1021,7 @@ }, "tooltip": { "mode": "multi", - "sort": "none" + "sort": "desc" } }, "pluginVersion": "10.4.0", @@ -970,11 +1030,13 @@ "datasource": { "uid": "$datasource" }, - "expr": "sort_desc(sum(container_memory_working_set_bytes{name!~\".+POD.+\",cluster_type=~\"management_cluster\"}) by (container) / (1024*1024*1024))", + "editorMode": "code", + "expr": "sum(container_memory_working_set_bytes{name!~\".+POD.+\",cluster_type=~\"management_cluster\", container!=\"\"}) by (container)", "format": "time_series", "interval": "", "intervalFactor": 1, "legendFormat": "{{ container }}", + "range": true, "refId": "A" } ], @@ -1072,4 +1134,4 @@ "uid": "HuYOZ89mk", "version": 1, "weekStart": "" -} +} \ No newline at end of file