From b47bf7046c038cabb43132bc02866add7ccbc172 Mon Sep 17 00:00:00 2001 From: Tim Ebert Date: Wed, 23 Aug 2023 12:20:29 +0200 Subject: [PATCH] Add `pod` variable to controller-runtime dashboard --- .../dashboards/controller-runtime.json | 89 ++++++++++++++----- 1 file changed, 68 insertions(+), 21 deletions(-) diff --git a/webhosting-operator/config/monitoring/default/dashboards/controller-runtime.json b/webhosting-operator/config/monitoring/default/dashboards/controller-runtime.json index 63e9996d..7a0f8ebf 100644 --- a/webhosting-operator/config/monitoring/default/dashboards/controller-runtime.json +++ b/webhosting-operator/config/monitoring/default/dashboards/controller-runtime.json @@ -94,7 +94,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "sum(rate(controller_runtime_reconcile_total{job=\"$job\",controller=~\"$controller\"}[$__range])) by (controller)", + "expr": "sum(rate(controller_runtime_reconcile_total{job=\"$job\",pod=~\"$pod\",controller=~\"$controller\"}[$__range])) by (controller)", "format": "time_series", "hide": false, "instant": true, @@ -208,7 +208,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "sum(controller_runtime_max_concurrent_reconciles{job=\"$job\",controller=~\"$controller\"}) by (controller)", + "expr": "sum(controller_runtime_max_concurrent_reconciles{job=\"$job\",pod=~\"$pod\",controller=~\"$controller\"}) by (controller)", "format": "table", "hide": false, "instant": true, @@ -293,7 +293,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "sum(rate(controller_runtime_reconcile_time_seconds_sum{job=\"$job\",controller=~\"$controller\"}[$__range])) by (controller)", + "expr": "sum(rate(controller_runtime_reconcile_time_seconds_sum{job=\"$job\",pod=~\"$pod\",controller=~\"$controller\"}[$__range])) by (controller)", "format": "time_series", "hide": false, "instant": true, @@ -411,7 +411,7 @@ }, "editorMode": "code", "exemplar": true, - "expr": "sum(rate(controller_runtime_reconcile_total{job=\"$job\",controller=~\"$controller\"}[$__rate_interval])) by (controller)", + "expr": "sum(rate(controller_runtime_reconcile_total{job=\"$job\",pod=~\"$pod\",controller=~\"$controller\"}[$__rate_interval])) by (controller)", "interval": "", "legendFormat": "{{controller}}", "range": true, @@ -565,7 +565,7 @@ }, "editorMode": "code", "exemplar": true, - "expr": "sum(rate(controller_runtime_reconcile_total{job=\"$job\",controller=~\"$controller\"}[$__rate_interval])) by (result)", + "expr": "sum(rate(controller_runtime_reconcile_total{job=\"$job\",pod=~\"$pod\",controller=~\"$controller\"}[$__rate_interval])) by (result)", "interval": "", "legendFormat": "{{result}}", "range": true, @@ -663,7 +663,7 @@ }, "editorMode": "code", "exemplar": true, - "expr": "sum(rate(controller_runtime_reconcile_errors_total{job=\"$job\",controller=~\"$controller\"}[$__rate_interval])) by (controller)", + "expr": "sum(rate(controller_runtime_reconcile_errors_total{job=\"$job\",pod=~\"$pod\",controller=~\"$controller\"}[$__rate_interval])) by (controller)", "interval": "", "legendFormat": "{{controller}}", "range": true, @@ -756,7 +756,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "histogram_quantile($percentile/100, sum(rate(controller_runtime_reconcile_time_seconds_bucket{job=\"$job\",controller=~\"$controller\"}[$__rate_interval])) by (controller,le))", + "expr": "histogram_quantile($percentile/100, sum(rate(controller_runtime_reconcile_time_seconds_bucket{job=\"$job\",pod=~\"$pod\",controller=~\"$controller\"}[$__rate_interval])) by (controller,le))", "format": "time_series", "instant": false, "interval": "", @@ -863,7 +863,7 @@ }, "editorMode": "code", "exemplar": true, - "expr": "sum(controller_runtime_active_workers{job=\"$job\",controller=~\"$controller\"}) by (controller)", + "expr": "sum(controller_runtime_active_workers{job=\"$job\",pod=~\"$pod\",controller=~\"$controller\"}) by (controller)", "interval": "", "legendFormat": "{{controller}}", "range": true, @@ -969,7 +969,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "sum(controller_runtime_max_concurrent_reconciles{job=\"$job\",controller=~\"$controller\"}) by (controller)", + "expr": "sum(controller_runtime_max_concurrent_reconciles{job=\"$job\",pod=~\"$pod\",controller=~\"$controller\"}) by (controller)", "format": "table", "hide": false, "instant": true, @@ -1079,7 +1079,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "sum(rate(workqueue_unfinished_work_seconds{job=\"$job\",name=~\"$controller\"}[$__rate_interval])) by (name)", + "expr": "sum(rate(workqueue_unfinished_work_seconds{job=\"$job\",pod=~\"$pod\",name=~\"$controller\"}[$__rate_interval])) by (name)", "format": "time_series", "instant": false, "interval": "", @@ -1174,7 +1174,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "max(workqueue_longest_running_processor_seconds{job=\"$job\",name=~\"$controller\"}) by (name)", + "expr": "max(workqueue_longest_running_processor_seconds{job=\"$job\",pod=~\"$pod\",name=~\"$controller\"}) by (name)", "format": "time_series", "instant": false, "interval": "", @@ -1215,6 +1215,8 @@ "mode": "palette-classic" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -1248,7 +1250,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null } ] }, @@ -1283,7 +1286,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "sum(rate(workqueue_adds_total{job=\"$job\",name=~\"$controller\"}[$__rate_interval])) by (name)", + "expr": "sum(rate(workqueue_adds_total{job=\"$job\",pod=~\"$pod\",name=~\"$controller\"}[$__rate_interval])) by (name)", "format": "time_series", "instant": false, "interval": "", @@ -1307,6 +1310,8 @@ "mode": "palette-classic" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -1340,7 +1345,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null } ] }, @@ -1375,7 +1381,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "sum(rate(workqueue_retries_total{job=\"$job\",name=~\"$controller\"}[$__rate_interval])) by (name)", + "expr": "sum(rate(workqueue_retries_total{job=\"$job\",pod=~\"$pod\",name=~\"$controller\"}[$__rate_interval])) by (name)", "format": "time_series", "instant": false, "interval": "", @@ -1399,6 +1405,8 @@ "mode": "palette-classic" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -1432,7 +1440,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null } ] }, @@ -1467,7 +1476,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "histogram_quantile($percentile/100, sum(rate(workqueue_queue_duration_seconds_bucket{job=\"$job\",name=~\"$controller\"}[$__rate_interval])) by (name,le))", + "expr": "histogram_quantile($percentile/100, sum(rate(workqueue_queue_duration_seconds_bucket{job=\"$job\",pod=~\"$pod\",name=~\"$controller\"}[$__rate_interval])) by (name,le))", "format": "time_series", "instant": false, "interval": "", @@ -1491,6 +1500,8 @@ "mode": "palette-classic" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -1524,7 +1535,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null } ] }, @@ -1559,7 +1571,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "histogram_quantile($percentile/100, sum(rate(workqueue_work_duration_seconds_bucket{job=\"$job\",name=~\"$controller\"}[$__rate_interval])) by (name,le))", + "expr": "histogram_quantile($percentile/100, sum(rate(workqueue_work_duration_seconds_bucket{job=\"$job\",pod=~\"$pod\",name=~\"$controller\"}[$__rate_interval])) by (name,le))", "format": "time_series", "instant": false, "interval": "", @@ -1583,6 +1595,8 @@ "mode": "palette-classic" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -1616,7 +1630,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null } ] }, @@ -1651,7 +1666,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "sum(workqueue_depth{job=\"$job\",name=~\"$controller\"}) by (name)", + "expr": "sum(workqueue_depth{job=\"$job\",pod=~\"$pod\",name=~\"$controller\"}) by (name)", "format": "time_series", "instant": false, "interval": "", @@ -1749,6 +1764,38 @@ "sort": 1, "type": "query" }, + { + "allFormat": "glob", + "allValue": ".*", + "current": { + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(controller_runtime_reconcile_total{job=\"$job\"}, pod)", + "hide": 0, + "includeAll": true, + "multi": true, + "name": "pod", + "options": [], + "query": { + "query": "label_values(controller_runtime_reconcile_total{job=\"$job\"}, pod)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + }, { "current": { "selected": false,