From 3828babb3625e143dc6fc4e7619e8dbd3713f79c Mon Sep 17 00:00:00 2001 From: Jose Armesto Date: Wed, 3 Jul 2024 14:03:37 +0200 Subject: [PATCH] Remove app label in phoenix dashboards (#587) * Remove app label in phoenix dashboards * Fix kiam panel for number of replicas * Use regex because job has namespace in it * Use container for kube-proxy --- CHANGELOG.md | 3 +- .../private/capa-aggregated-error-logs.json | 6 ++-- .../private/capi-aggregated-error-logs.json | 6 ++-- .../dashboards/aws/private/kiam.json | 8 ++--- .../dashboards/mixin/kube-proxy.json | 36 +++++++++---------- 5 files changed, 30 insertions(+), 29 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 31b3eba8..1b83d524 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,7 +24,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed -- Removed the dashboard 'Webhook Health'. +- Removed the dashboard 'Webhook Health'. +- Get rid of the `app` label in Phoenix dashboards. ## [3.19.0] - 2024-06-13 diff --git a/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/capa-aggregated-error-logs.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/capa-aggregated-error-logs.json index e367932e..518713c8 100644 --- a/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/capa-aggregated-error-logs.json +++ b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/capa-aggregated-error-logs.json @@ -52,7 +52,7 @@ "uid": "${loki_datasource}" }, "editorMode": "builder", - "expr": "{app=~\"cluster-api-provider-aws|capa-iam-operator|aws-resolver-rules-operator|irsa-operator\"} |~ `(?i)error` |= `$cluster` | logfmt", + "expr": "{job=~\".*cluster-api-provider-aws|.*capa-iam-operator|.*aws-resolver-rules-operator|.*irsa-operator\"} |~ `(?i)error` |= `$cluster` | logfmt", "queryType": "range", "refId": "A" } @@ -106,7 +106,7 @@ "type": "prometheus", "uid": "${prometheus_datasource}" }, - "definition": "label_values(up{app=\"kubernetes\"},cluster_id)", + "definition": "label_values(up{service=\"kubernetes\"},cluster_id)", "hide": 0, "includeAll": false, "label": "Cluster", @@ -115,7 +115,7 @@ "options": [], "query": { "qryType": 1, - "query": "label_values(up{app=\"kubernetes\"},cluster_id)", + "query": "label_values(up{service=\"kubernetes\"},cluster_id)", "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 2, diff --git a/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/capi-aggregated-error-logs.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/capi-aggregated-error-logs.json index 3fbfd7a8..ea2025c9 100644 --- a/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/capi-aggregated-error-logs.json +++ b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/capi-aggregated-error-logs.json @@ -52,7 +52,7 @@ "uid": "${loki_datasource}" }, "editorMode": "builder", - "expr": "{app=~\"cluster-api\"} |~ `(?i)error` |= `$cluster` | logfmt", + "expr": "{job=~\".*cluster-api\"} |~ `(?i)error` |= `$cluster` | logfmt", "queryType": "range", "refId": "A" } @@ -106,7 +106,7 @@ "type": "prometheus", "uid": "${prometheus_datasource}" }, - "definition": "label_values(up{app=\"kubernetes\"},cluster_id)", + "definition": "label_values(up{service=\"kubernetes\"},cluster_id)", "hide": 0, "includeAll": false, "label": "Cluster", @@ -115,7 +115,7 @@ "options": [], "query": { "qryType": 1, - "query": "label_values(up{app=\"kubernetes\"},cluster_id)", + "query": "label_values(up{service=\"kubernetes\"},cluster_id)", "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 2, diff --git a/helm/dashboards/dashboards/aws/private/kiam.json b/helm/dashboards/dashboards/aws/private/kiam.json index 688834da..860b1c88 100644 --- a/helm/dashboards/dashboards/aws/private/kiam.json +++ b/helm/dashboards/dashboards/aws/private/kiam.json @@ -2941,7 +2941,7 @@ "calcs": [ "lastNotNull" ], - "fields": "/^{app=\"kube-state-metrics\", cluster_id=\"xz9op\", cluster_type=~\"workload_cluster\", daemonset=\"kiam-server\", namespace=\"kube-system\", job=~\"workload-cluster-xz9op-workload\", namespace=\"kube-system\", node=\"ip-10-1-2-161.eu-west-1.compute.internal\", pod=\"kube-state-metrics-7f7d997cbd-v8g5w\"}$/", + "fields": "", "values": false }, "showPercentChange": false, @@ -3103,7 +3103,7 @@ "calcs": [ "lastNotNull" ], - "fields": "/^{app=\"kube-state-metrics\", cluster_id=\"xz9op\", cluster_type=~\"workload_cluster\", daemonset=\"kiam-server\", namespace=\"kube-system\", job=~\"workload-cluster-xz9op-workload\", namespace=\"kube-system\", node=\"ip-10-1-2-161.eu-west-1.compute.internal\", pod=\"kube-state-metrics-7f7d997cbd-v8g5w\"}$/", + "fields": "", "values": false }, "showPercentChange": false, @@ -3291,7 +3291,7 @@ "calcs": [ "lastNotNull" ], - "fields": "/^{app=\"kube-state-metrics\", cluster_id=\"xz9op\", cluster_type=~\"workload_cluster\", daemonset=\"kiam-agent\", namespace=\"kube-system\", job=~\"workload-cluster-xz9op-workload\", namespace=\"kube-system\", node=\"ip-10-1-2-161.eu-west-1.compute.internal\", pod=\"kube-state-metrics-7f7d997cbd-v8g5w\"}$/", + "fields": "", "values": false }, "showPercentChange": false, @@ -3451,7 +3451,7 @@ "calcs": [ "lastNotNull" ], - "fields": "/^{app=\"kube-state-metrics\", cluster_id=\"xz9op\", cluster_type=~\"workload_cluster\", daemonset=\"kiam-agent\", namespace=\"kube-system\", job=~\"workload-cluster-xz9op-workload\", namespace=\"kube-system\", node=\"ip-10-1-2-161.eu-west-1.compute.internal\", pod=\"kube-state-metrics-7f7d997cbd-v8g5w\"}$/", + "fields": "", "values": false }, "showPercentChange": false, diff --git a/helm/dashboards/dashboards/mixin/kube-proxy.json b/helm/dashboards/dashboards/mixin/kube-proxy.json index c5bc75f0..a78067ef 100644 --- a/helm/dashboards/dashboards/mixin/kube-proxy.json +++ b/helm/dashboards/dashboards/mixin/kube-proxy.json @@ -90,7 +90,7 @@ { "datasource": "$datasource", "exemplar": true, - "expr": "sum(up{app=\"kube-proxy\"})", + "expr": "sum(up{container=\"kube-proxy\"})", "format": "time_series", "interval": "", "intervalFactor": 2, @@ -155,7 +155,7 @@ { "datasource": "$datasource", "exemplar": true, - "expr": "sum(rate(kubeproxy_sync_proxy_rules_duration_seconds_count{app=\"kube-proxy\", cluster_id=\"$cluster_id\", pod=~\"$instance\"}[5m]))", + "expr": "sum(rate(kubeproxy_sync_proxy_rules_duration_seconds_count{container=\"kube-proxy\", cluster_id=\"$cluster_id\", pod=~\"$instance\"}[5m]))", "format": "time_series", "interval": "", "intervalFactor": 2, @@ -249,7 +249,7 @@ { "datasource": "$datasource", "exemplar": true, - "expr": "histogram_quantile(0.99,rate(kubeproxy_sync_proxy_rules_duration_seconds_bucket{app=\"kube-proxy\",cluster_id=\"$cluster_id\",pod=~\"$instance\"}[5m]))", + "expr": "histogram_quantile(0.99,rate(kubeproxy_sync_proxy_rules_duration_seconds_bucket{container=\"kube-proxy\",cluster_id=\"$cluster_id\",pod=~\"$instance\"}[5m]))", "format": "time_series", "interval": "", "intervalFactor": 2, @@ -343,7 +343,7 @@ { "datasource": "$datasource", "exemplar": true, - "expr": "sum(rate(kubeproxy_network_programming_duration_seconds_count{app=\"kube-proxy\", cluster_id=\"$cluster_id\",pod=~\"$instance\"}[5m]))", + "expr": "sum(rate(kubeproxy_network_programming_duration_seconds_count{container=\"kube-proxy\", cluster_id=\"$cluster_id\",pod=~\"$instance\"}[5m]))", "format": "time_series", "interval": "", "intervalFactor": 2, @@ -440,7 +440,7 @@ { "datasource": "$datasource", "exemplar": true, - "expr": "histogram_quantile(0.99, sum(rate(kubeproxy_network_programming_duration_seconds_bucket{app=\"kube-proxy\", cluster_id=\"$cluster_id\",pod=~\"$instance\"}[5m])) by (instance, le))", + "expr": "histogram_quantile(0.99, sum(rate(kubeproxy_network_programming_duration_seconds_bucket{container=\"kube-proxy\", cluster_id=\"$cluster_id\",pod=~\"$instance\"}[5m])) by (instance, le))", "format": "time_series", "interval": "", "intervalFactor": 2, @@ -537,7 +537,7 @@ { "datasource": "$datasource", "exemplar": true, - "expr": "sum(rate(rest_client_requests_total{app=\"kube-proxy\", cluster_id=\"deu01\", code=~\"2..\"}[5m]))", + "expr": "sum(rate(rest_client_requests_total{container=\"kube-proxy\", cluster_id=\"deu01\", code=~\"2..\"}[5m]))", "format": "time_series", "instant": false, "interval": "", @@ -548,7 +548,7 @@ { "datasource": "$datasource", "exemplar": true, - "expr": "sum(rate(rest_client_requests_total{app=\"kube-proxy\", cluster_id=\"deu01\", code=~\"3..\"}[5m]))", + "expr": "sum(rate(rest_client_requests_total{container=\"kube-proxy\", cluster_id=\"deu01\", code=~\"3..\"}[5m]))", "format": "time_series", "interval": "", "intervalFactor": 2, @@ -558,7 +558,7 @@ { "datasource": "$datasource", "exemplar": true, - "expr": "sum(rate(rest_client_requests_total{app=\"kube-proxy\", cluster_id=\"deu01\", code=~\"4..\"}[5m]))", + "expr": "sum(rate(rest_client_requests_total{container=\"kube-proxy\", cluster_id=\"deu01\", code=~\"4..\"}[5m]))", "format": "time_series", "interval": "", "intervalFactor": 2, @@ -568,7 +568,7 @@ { "datasource": "$datasource", "exemplar": true, - "expr": "sum(rate(rest_client_requests_total{app=\"kube-proxy\", cluster_id=\"deu01\", code=~\"5..\"}[5m]))", + "expr": "sum(rate(rest_client_requests_total{container=\"kube-proxy\", cluster_id=\"deu01\", code=~\"5..\"}[5m]))", "format": "time_series", "interval": "", "intervalFactor": 2, @@ -663,7 +663,7 @@ { "datasource": "$datasource", "exemplar": true, - "expr": "sum(rate(rest_client_request_duration_seconds_count{app=\"kube-proxy\",cluster_id=\"$cluster_id\",pod=~\"$instance\",verb=\"POST\"}[5m]))", + "expr": "sum(rate(rest_client_request_duration_seconds_count{container=\"kube-proxy\",cluster_id=\"$cluster_id\",pod=~\"$instance\",verb=\"POST\"}[5m]))", "format": "time_series", "interval": "", "intervalFactor": 2, @@ -760,7 +760,7 @@ { "datasource": "$datasource", "exemplar": true, - "expr": "sum(rate(rest_client_request_duration_seconds_count{app=\"kube-proxy\", cluster_id=\"$cluster_id\",pod=~\"$instance\", verb=\"GET\"}[5m]))", + "expr": "sum(rate(rest_client_request_duration_seconds_count{container=\"kube-proxy\", cluster_id=\"$cluster_id\",pod=~\"$instance\", verb=\"GET\"}[5m]))", "format": "time_series", "interval": "", "intervalFactor": 2, @@ -857,7 +857,7 @@ { "datasource": "$datasource", "exemplar": true, - "expr": "process_resident_memory_bytes{app=\"kube-proxy\",cluster_id=\"$cluster_id\",pod=~\"$instance\"}", + "expr": "process_resident_memory_bytes{container=\"kube-proxy\",cluster_id=\"$cluster_id\",pod=~\"$instance\"}", "format": "time_series", "interval": "", "intervalFactor": 2, @@ -953,7 +953,7 @@ { "datasource": "$datasource", "exemplar": true, - "expr": "rate(process_cpu_seconds_total{app=\"kube-proxy\",cluster_id=\"$cluster_id\",pod=~\"$instance\"}[5m])", + "expr": "rate(process_cpu_seconds_total{container=\"kube-proxy\",cluster_id=\"$cluster_id\",pod=~\"$instance\"}[5m])", "format": "time_series", "interval": "", "intervalFactor": 2, @@ -1050,7 +1050,7 @@ { "datasource": "$datasource", "exemplar": true, - "expr": "go_goroutines{app=\"kube-proxy\",cluster_id=\"$cluster_id\",pod=~\"$instance\"}", + "expr": "go_goroutines{container=\"kube-proxy\",cluster_id=\"$cluster_id\",pod=~\"$instance\"}", "format": "time_series", "interval": "", "intervalFactor": 2, @@ -1121,14 +1121,14 @@ "value": "$__all" }, "datasource": "$datasource", - "definition": "label_values(rest_client_requests_total{app=\"kube-proxy\"}, pod)", + "definition": "label_values(rest_client_requests_total{container=\"kube-proxy\"}, pod)", "hide": 0, "includeAll": true, "multi": false, "name": "instance", "options": [], "query": { - "query": "label_values(rest_client_requests_total{app=\"kube-proxy\"}, pod)", + "query": "label_values(rest_client_requests_total{container=\"kube-proxy\"}, pod)", "refId": "StandardVariableQuery" }, "refresh": 2, @@ -1143,14 +1143,14 @@ { "current": {}, "datasource": "$datasource", - "definition": "label_values(process_cpu_seconds_total{app=\"kube-proxy\"}, cluster_id)", + "definition": "label_values(process_cpu_seconds_total{container=\"kube-proxy\"}, cluster_id)", "hide": 0, "includeAll": false, "multi": true, "name": "cluster_id", "options": [], "query": { - "query": "label_values(process_cpu_seconds_total{app=\"kube-proxy\"}, cluster_id)", + "query": "label_values(process_cpu_seconds_total{container=\"kube-proxy\"}, cluster_id)", "refId": "StandardVariableQuery" }, "refresh": 1,