From 6ab98a6d12aded561a154a5ee089102312960c8a Mon Sep 17 00:00:00 2001 From: Daniel Simionato Date: Mon, 10 Jun 2024 18:54:44 +0200 Subject: [PATCH] Reviewed labels used in turtles dashboards. (#573) * Reviewed labels used in turtles dashboards. * Updated turtles mixins dashboards --- CHANGELOG.md | 1 + .../shared/private/kubernetes-api-uptime.json | 4 +- .../shared/private/persistentvolume.json | 8 +-- .../dashboards/mixin/controller-manager.json | 30 ++++---- .../mixin/k8s-resources-cluster.json | 68 +++++++++---------- .../mixin/k8s-resources-multicluster.json | 30 ++++---- .../mixin/k8s-resources-namespace.json | 50 +++++++------- .../dashboards/mixin/k8s-resources-node.json | 2 +- .../dashboards/mixin/k8s-resources-pod.json | 66 +++++++++--------- .../k8s-resources-workloads-namespace.json | 52 +++++++------- .../mixin/persistentvolumesusage.json | 18 ++--- .../dashboards/mixin/scheduler.json | 40 +++++------ .../dashboards/mixin/statefulset.json | 28 ++++---- 13 files changed, 199 insertions(+), 198 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a47e65b..8f93af6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Replace Cluster ID with cluster in dashboard labels. - remotewrite: improve legends - remotewrite: add count of agent replicas +- Reviewed labels used in turtles dashboards - servicemonitors-overview: add info about agent pods ### Fixed diff --git a/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/kubernetes-api-uptime.json b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/kubernetes-api-uptime.json index 0b27e54d..2e0d854b 100644 --- a/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/kubernetes-api-uptime.json +++ b/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/kubernetes-api-uptime.json @@ -93,7 +93,7 @@ ], "targets": [ { - "expr": "sum(sum_over_time(up{cluster_type=~\"workload_cluster\",app=\"kubernetes\"}[1w])) by (cluster_id) / sum(count_over_time(up{cluster_type=~\"workload_cluster\",app=\"kubernetes\"}[1w])) by (cluster_id)", + "expr": "sum(sum_over_time(up{cluster_type=~\"workload_cluster\",job=\"apiserver\"}[1w])) by (cluster_id) / sum(count_over_time(up{cluster_type=~\"workload_cluster\",job=\"apiserver\"}[1w])) by (cluster_id)", "format": "table", "instant": true, "intervalFactor": 2, @@ -148,7 +148,7 @@ "steppedLine": false, "targets": [ { - "expr": "1 - up{cluster_type=\"workload_cluster\",app=\"kubernetes\"}", + "expr": "1 - up{cluster_type=\"workload_cluster\",job=\"apiserver\"}", "format": "time_series", "intervalFactor": 2, "refId": "A" diff --git a/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/persistentvolume.json b/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/persistentvolume.json index e83d020a..c31db1ce 100644 --- a/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/persistentvolume.json +++ b/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/persistentvolume.json @@ -1535,7 +1535,7 @@ "type": "prometheus", "uid": "$datasource" }, - "definition": "label_values(kubelet_volume_stats_capacity_bytes{app=\"kubelet\"},cluster_id)", + "definition": "label_values(kubelet_volume_stats_capacity_bytes{job=\"kubelet\"},cluster_id)", "hide": 0, "includeAll": false, "label": "Cluster", @@ -1543,7 +1543,7 @@ "name": "cluster_id", "options": [], "query": { - "query": "label_values(kubelet_volume_stats_capacity_bytes{app=\"kubelet\"},cluster_id)", + "query": "label_values(kubelet_volume_stats_capacity_bytes{job=\"kubelet\"},cluster_id)", "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, @@ -1567,7 +1567,7 @@ "type": "prometheus", "uid": "$datasource" }, - "definition": "label_values(kubelet_volume_stats_capacity_bytes{app=\"kubelet\"},namespace)", + "definition": "label_values(kubelet_volume_stats_capacity_bytes{job=\"kubelet\"},namespace)", "hide": 0, "includeAll": true, "label": "Namespace", @@ -1575,7 +1575,7 @@ "name": "namespace", "options": [], "query": { - "query": "label_values(kubelet_volume_stats_capacity_bytes{app=\"kubelet\"},namespace)", + "query": "label_values(kubelet_volume_stats_capacity_bytes{job=\"kubelet\"},namespace)", "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 2, diff --git a/helm/dashboards/dashboards/mixin/controller-manager.json b/helm/dashboards/dashboards/mixin/controller-manager.json index 77c8f14a..5a55493e 100644 --- a/helm/dashboards/dashboards/mixin/controller-manager.json +++ b/helm/dashboards/dashboards/mixin/controller-manager.json @@ -77,7 +77,7 @@ "tableColumn": "", "targets": [ { - "expr": "sum(up{cluster_id=\"$cluster\", app=\"kube-controller-manager\"})", + "expr": "sum(up{cluster_id=\"$cluster\", job=\"kube-controller-manager\"})", "format": "time_series", "intervalFactor": 2, "legendFormat": "", @@ -139,7 +139,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(rate(workqueue_adds_total{cluster_id=\"$cluster\", app=\"kube-controller-manager\", instance=~\"$instance\"}[$__rate_interval])) by (cluster_id, instance, name)", + "expr": "sum(rate(workqueue_adds_total{cluster_id=\"$cluster\", job=\"kube-controller-manager\", instance=~\"$instance\"}[$__rate_interval])) by (cluster_id, instance, name)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{cluster_id}} {{instance}} {{name}}", @@ -234,7 +234,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(rate(workqueue_depth{cluster_id=\"$cluster\", app=\"kube-controller-manager\", instance=~\"$instance\"}[$__rate_interval])) by (cluster_id, instance, name)", + "expr": "sum(rate(workqueue_depth{cluster_id=\"$cluster\", job=\"kube-controller-manager\", instance=~\"$instance\"}[$__rate_interval])) by (cluster_id, instance, name)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{cluster_id}} {{instance}} {{name}}", @@ -329,7 +329,7 @@ "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.99, sum(rate(workqueue_queue_duration_seconds_bucket{cluster_id=\"$cluster\", app=\"kube-controller-manager\", instance=~\"$instance\"}[$__rate_interval])) by (cluster_id, instance, name, le))", + "expr": "histogram_quantile(0.99, sum(rate(workqueue_queue_duration_seconds_bucket{cluster_id=\"$cluster\", job=\"kube-controller-manager\", instance=~\"$instance\"}[$__rate_interval])) by (cluster_id, instance, name, le))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{cluster_id}} {{instance}} {{name}}", @@ -424,28 +424,28 @@ "steppedLine": false, "targets": [ { - "expr": "sum(rate(rest_client_requests_total{app=\"kube-controller-manager\", instance=~\"$instance\",code=~\"2..\"}[$__rate_interval]))", + "expr": "sum(rate(rest_client_requests_total{job=\"kube-controller-manager\", instance=~\"$instance\",code=~\"2..\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "2xx", "refId": "A" }, { - "expr": "sum(rate(rest_client_requests_total{app=\"kube-controller-manager\", instance=~\"$instance\",code=~\"3..\"}[$__rate_interval]))", + "expr": "sum(rate(rest_client_requests_total{job=\"kube-controller-manager\", instance=~\"$instance\",code=~\"3..\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "3xx", "refId": "B" }, { - "expr": "sum(rate(rest_client_requests_total{app=\"kube-controller-manager\", instance=~\"$instance\",code=~\"4..\"}[$__rate_interval]))", + "expr": "sum(rate(rest_client_requests_total{job=\"kube-controller-manager\", instance=~\"$instance\",code=~\"4..\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "4xx", "refId": "C" }, { - "expr": "sum(rate(rest_client_requests_total{app=\"kube-controller-manager\", instance=~\"$instance\",code=~\"5..\"}[$__rate_interval]))", + "expr": "sum(rate(rest_client_requests_total{job=\"kube-controller-manager\", instance=~\"$instance\",code=~\"5..\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "5xx", @@ -527,7 +527,7 @@ "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster_id=\"$cluster\", app=\"kube-controller-manager\", instance=~\"$instance\", verb=\"POST\"}[$__rate_interval])) by (verb, url, le))", + "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster_id=\"$cluster\", job=\"kube-controller-manager\", instance=~\"$instance\", verb=\"POST\"}[$__rate_interval])) by (verb, url, le))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{verb}} {{url}}", @@ -622,7 +622,7 @@ "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster_id=\"$cluster\", app=\"kube-controller-manager\", instance=~\"$instance\", verb=\"GET\"}[$__rate_interval])) by (verb, url, le))", + "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster_id=\"$cluster\", job=\"kube-controller-manager\", instance=~\"$instance\", verb=\"GET\"}[$__rate_interval])) by (verb, url, le))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{verb}} {{url}}", @@ -717,7 +717,7 @@ "steppedLine": false, "targets": [ { - "expr": "process_resident_memory_bytes{cluster_id=\"$cluster\", app=\"kube-controller-manager\",instance=~\"$instance\"}", + "expr": "process_resident_memory_bytes{cluster_id=\"$cluster\", job=\"kube-controller-manager\",instance=~\"$instance\"}", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{instance}}", @@ -799,7 +799,7 @@ "steppedLine": false, "targets": [ { - "expr": "rate(process_cpu_seconds_total{cluster_id=\"$cluster\", app=\"kube-controller-manager\",instance=~\"$instance\"}[$__rate_interval])", + "expr": "rate(process_cpu_seconds_total{cluster_id=\"$cluster\", job=\"kube-controller-manager\",instance=~\"$instance\"}[$__rate_interval])", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{instance}}", @@ -881,7 +881,7 @@ "steppedLine": false, "targets": [ { - "expr": "go_goroutines{cluster_id=\"$cluster\", app=\"kube-controller-manager\",instance=~\"$instance\"}", + "expr": "go_goroutines{cluster_id=\"$cluster\", job=\"kube-controller-manager\",instance=~\"$instance\"}", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{instance}}", @@ -966,7 +966,7 @@ "multi": false, "name": "cluster", "options": [], - "query": "label_values(up{app=\"kube-controller-manager\"}, cluster_id)", + "query": "label_values(up{job=\"kube-controller-manager\"}, cluster_id)", "refresh": 2, "regex": "", "sort": 1, @@ -986,7 +986,7 @@ "multi": false, "name": "instance", "options": [], - "query": "label_values(up{cluster_id=\"$cluster\", app=\"kube-controller-manager\"}, instance)", + "query": "label_values(up{cluster_id=\"$cluster\", job=\"kube-controller-manager\"}, instance)", "refresh": 2, "regex": "", "sort": 1, diff --git a/helm/dashboards/dashboards/mixin/k8s-resources-cluster.json b/helm/dashboards/dashboards/mixin/k8s-resources-cluster.json index 746a1489..a9fb0368 100644 --- a/helm/dashboards/dashboards/mixin/k8s-resources-cluster.json +++ b/helm/dashboards/dashboards/mixin/k8s-resources-cluster.json @@ -128,7 +128,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(namespace_cpu:kube_pod_container_resource_requests:sum{cluster_id=\"$cluster\"}) / sum(kube_node_status_allocatable{app=\"kube-state-metrics\",resource=\"cpu\",cluster_id=\"$cluster\"})", + "expr": "sum(namespace_cpu:kube_pod_container_resource_requests:sum{cluster_id=\"$cluster\"}) / sum(kube_node_status_allocatable{resource=\"cpu\",cluster_id=\"$cluster\"})", "format": "time_series", "instant": true, "intervalFactor": 2, @@ -207,7 +207,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(namespace_cpu:kube_pod_container_resource_limits:sum{cluster_id=\"$cluster\"}) / sum(kube_node_status_allocatable{app=\"kube-state-metrics\",resource=\"cpu\",cluster_id=\"$cluster\"})", + "expr": "sum(namespace_cpu:kube_pod_container_resource_limits:sum{cluster_id=\"$cluster\"}) / sum(kube_node_status_allocatable{resource=\"cpu\",cluster_id=\"$cluster\"})", "format": "time_series", "instant": true, "intervalFactor": 2, @@ -286,7 +286,7 @@ "steppedLine": false, "targets": [ { - "expr": "1 - sum(:node_memory_MemAvailable_bytes:sum{cluster_id=\"$cluster\"}) / sum(node_memory_MemTotal_bytes{app=\"node-exporter\",cluster_id=\"$cluster\"})", + "expr": "1 - sum(:node_memory_MemAvailable_bytes:sum{cluster_id=\"$cluster\"}) / sum(node_memory_MemTotal_bytes{cluster_id=\"$cluster\"})", "format": "time_series", "instant": true, "intervalFactor": 2, @@ -365,7 +365,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(namespace_memory:kube_pod_container_resource_requests:sum{cluster_id=\"$cluster\"}) / sum(kube_node_status_allocatable{app=\"kube-state-metrics\",resource=\"memory\",cluster_id=\"$cluster\"})", + "expr": "sum(namespace_memory:kube_pod_container_resource_requests:sum{cluster_id=\"$cluster\"}) / sum(kube_node_status_allocatable{resource=\"memory\",cluster_id=\"$cluster\"})", "format": "time_series", "instant": true, "intervalFactor": 2, @@ -444,7 +444,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(namespace_memory:kube_pod_container_resource_limits:sum{cluster_id=\"$cluster\"}) / sum(kube_node_status_allocatable{app=\"kube-state-metrics\",resource=\"memory\",cluster_id=\"$cluster\"})", + "expr": "sum(namespace_memory:kube_pod_container_resource_limits:sum{cluster_id=\"$cluster\"}) / sum(kube_node_status_allocatable{resource=\"memory\",cluster_id=\"$cluster\"})", "format": "time_series", "instant": true, "intervalFactor": 2, @@ -764,7 +764,7 @@ ], "targets": [ { - "expr": "sum(kube_pod_owner{app=\"kube-state-metrics\", cluster_id=\"$cluster\"}) by (namespace)", + "expr": "sum(kube_pod_owner{cluster_id=\"$cluster\"}) by (namespace)", "format": "table", "instant": true, "intervalFactor": 2, @@ -911,7 +911,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(container_memory_rss{app=\"cadvisor\", cluster_id=\"$cluster\", container!=\"\"}) by (namespace)", + "expr": "sum(container_memory_rss{cluster_id=\"$cluster\", container!=\"\"}) by (namespace)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{namespace}}", @@ -1141,7 +1141,7 @@ ], "targets": [ { - "expr": "sum(kube_pod_owner{app=\"kube-state-metrics\", cluster_id=\"$cluster\"}) by (namespace)", + "expr": "sum(kube_pod_owner{cluster_id=\"$cluster\"}) by (namespace)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1159,7 +1159,7 @@ "step": 10 }, { - "expr": "sum(container_memory_rss{app=\"cadvisor\", cluster_id=\"$cluster\", container!=\"\"}) by (namespace)", + "expr": "sum(container_memory_rss{cluster_id=\"$cluster\", container!=\"\"}) by (namespace)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1177,7 +1177,7 @@ "step": 10 }, { - "expr": "sum(container_memory_rss{app=\"cadvisor\", cluster_id=\"$cluster\", container!=\"\"}) by (namespace) / sum(namespace_memory:kube_pod_container_resource_requests:sum{cluster_id=\"$cluster\"}) by (namespace)", + "expr": "sum(container_memory_rss{cluster_id=\"$cluster\", container!=\"\"}) by (namespace) / sum(namespace_memory:kube_pod_container_resource_requests:sum{cluster_id=\"$cluster\"}) by (namespace)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1195,7 +1195,7 @@ "step": 10 }, { - "expr": "sum(container_memory_rss{app=\"cadvisor\", cluster_id=\"$cluster\", container!=\"\"}) by (namespace) / sum(namespace_memory:kube_pod_container_resource_limits:sum{cluster_id=\"$cluster\"}) by (namespace)", + "expr": "sum(container_memory_rss{cluster_id=\"$cluster\", container!=\"\"}) by (namespace) / sum(namespace_memory:kube_pod_container_resource_limits:sum{cluster_id=\"$cluster\"}) by (namespace)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1412,7 +1412,7 @@ ], "targets": [ { - "expr": "sum(irate(container_network_receive_bytes_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "expr": "sum(irate(container_network_receive_bytes_total{cluster_id=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1421,7 +1421,7 @@ "step": 10 }, { - "expr": "sum(irate(container_network_transmit_bytes_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "expr": "sum(irate(container_network_transmit_bytes_total{cluster_id=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1430,7 +1430,7 @@ "step": 10 }, { - "expr": "sum(irate(container_network_receive_packets_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "expr": "sum(irate(container_network_receive_packets_total{cluster_id=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1439,7 +1439,7 @@ "step": 10 }, { - "expr": "sum(irate(container_network_transmit_packets_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "expr": "sum(irate(container_network_transmit_packets_total{cluster_id=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1448,7 +1448,7 @@ "step": 10 }, { - "expr": "sum(irate(container_network_receive_packets_dropped_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "expr": "sum(irate(container_network_receive_packets_dropped_total{cluster_id=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1457,7 +1457,7 @@ "step": 10 }, { - "expr": "sum(irate(container_network_transmit_packets_dropped_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "expr": "sum(irate(container_network_transmit_packets_dropped_total{cluster_id=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1550,7 +1550,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(irate(container_network_receive_bytes_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "expr": "sum(irate(container_network_receive_bytes_total{cluster_id=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{namespace}}", @@ -1629,7 +1629,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(irate(container_network_transmit_bytes_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "expr": "sum(irate(container_network_transmit_bytes_total{cluster_id=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{namespace}}", @@ -1720,7 +1720,7 @@ "steppedLine": false, "targets": [ { - "expr": "avg(irate(container_network_receive_bytes_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "expr": "avg(irate(container_network_receive_bytes_total{cluster_id=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{namespace}}", @@ -1799,7 +1799,7 @@ "steppedLine": false, "targets": [ { - "expr": "avg(irate(container_network_transmit_bytes_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "expr": "avg(irate(container_network_transmit_bytes_total{cluster_id=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{namespace}}", @@ -1890,7 +1890,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(irate(container_network_receive_packets_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "expr": "sum(irate(container_network_receive_packets_total{cluster_id=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{namespace}}", @@ -1969,7 +1969,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(irate(container_network_transmit_packets_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "expr": "sum(irate(container_network_transmit_packets_total{cluster_id=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{namespace}}", @@ -2060,7 +2060,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(irate(container_network_receive_packets_dropped_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "expr": "sum(irate(container_network_receive_packets_dropped_total{cluster_id=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{namespace}}", @@ -2139,7 +2139,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(irate(container_network_transmit_packets_dropped_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", + "expr": "sum(irate(container_network_transmit_packets_dropped_total{cluster_id=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{namespace}}", @@ -2231,7 +2231,7 @@ "steppedLine": false, "targets": [ { - "expr": "ceil(sum by(namespace) (rate(container_fs_reads_total{app=\"cadvisor\", container!=\"\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", cluster_id=\"$cluster\", namespace!=\"\"}[$__rate_interval]) + rate(container_fs_writes_total{app=\"cadvisor\", container!=\"\", cluster_id=\"$cluster\", namespace!=\"\"}[$__rate_interval])))", + "expr": "ceil(sum by(namespace) (rate(container_fs_reads_total{container!=\"\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", cluster_id=\"$cluster\", namespace!=\"\"}[$__rate_interval]) + rate(container_fs_writes_total{container!=\"\", cluster_id=\"$cluster\", namespace!=\"\"}[$__rate_interval])))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{namespace}}", @@ -2310,7 +2310,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by(namespace) (rate(container_fs_reads_bytes_total{app=\"cadvisor\", container!=\"\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", cluster_id=\"$cluster\", namespace!=\"\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{app=\"cadvisor\", container!=\"\", cluster_id=\"$cluster\", namespace!=\"\"}[$__rate_interval]))", + "expr": "sum by(namespace) (rate(container_fs_reads_bytes_total{container!=\"\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", cluster_id=\"$cluster\", namespace!=\"\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{container!=\"\", cluster_id=\"$cluster\", namespace!=\"\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{namespace}}", @@ -2529,7 +2529,7 @@ ], "targets": [ { - "expr": "sum by(namespace) (rate(container_fs_reads_total{app=\"cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace!=\"\"}[$__rate_interval]))", + "expr": "sum by(namespace) (rate(container_fs_reads_total{device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace!=\"\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, @@ -2538,7 +2538,7 @@ "step": 10 }, { - "expr": "sum by(namespace) (rate(container_fs_writes_total{app=\"cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace!=\"\"}[$__rate_interval]))", + "expr": "sum by(namespace) (rate(container_fs_writes_total{device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace!=\"\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, @@ -2547,7 +2547,7 @@ "step": 10 }, { - "expr": "sum by(namespace) (rate(container_fs_reads_total{app=\"cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace!=\"\"}[$__rate_interval]) + rate(container_fs_writes_total{app=\"cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace!=\"\"}[$__rate_interval]))", + "expr": "sum by(namespace) (rate(container_fs_reads_total{device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace!=\"\"}[$__rate_interval]) + rate(container_fs_writes_total{device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace!=\"\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, @@ -2556,7 +2556,7 @@ "step": 10 }, { - "expr": "sum by(namespace) (rate(container_fs_reads_bytes_total{app=\"cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace!=\"\"}[$__rate_interval]))", + "expr": "sum by(namespace) (rate(container_fs_reads_bytes_total{device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace!=\"\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, @@ -2565,7 +2565,7 @@ "step": 10 }, { - "expr": "sum by(namespace) (rate(container_fs_writes_bytes_total{app=\"cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace!=\"\"}[$__rate_interval]))", + "expr": "sum by(namespace) (rate(container_fs_writes_bytes_total{device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace!=\"\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, @@ -2574,7 +2574,7 @@ "step": 10 }, { - "expr": "sum by(namespace) (rate(container_fs_reads_bytes_total{app=\"cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace!=\"\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{app=\"cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace!=\"\"}[$__rate_interval]))", + "expr": "sum by(namespace) (rate(container_fs_reads_bytes_total{device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace!=\"\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace!=\"\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, @@ -2664,7 +2664,7 @@ "multi": false, "name": "cluster", "options": [], - "query": "label_values(up{app=\"cadvisor\"}, cluster_id)", + "query": "label_values(up{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\"}, cluster_id)", "refresh": 2, "regex": "", "sort": 1, diff --git a/helm/dashboards/dashboards/mixin/k8s-resources-multicluster.json b/helm/dashboards/dashboards/mixin/k8s-resources-multicluster.json index 684e5127..c1d543d9 100644 --- a/helm/dashboards/dashboards/mixin/k8s-resources-multicluster.json +++ b/helm/dashboards/dashboards/mixin/k8s-resources-multicluster.json @@ -128,7 +128,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(kube_pod_container_resource_requests{app=\"kube-state-metrics\", resource=\"cpu\"}) / sum(kube_node_status_allocatable{app=\"kube-state-metrics\", resource=\"cpu\"})", + "expr": "sum(kube_pod_container_resource_requests{resource=\"cpu\"}) / sum(kube_node_status_allocatable{resource=\"cpu\"})", "format": "time_series", "instant": true, "intervalFactor": 2, @@ -207,7 +207,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(kube_pod_container_resource_limits{app=\"kube-state-metrics\", resource=\"cpu\"}) / sum(kube_node_status_allocatable{app=\"kube-state-metrics\", resource=\"cpu\"})", + "expr": "sum(kube_pod_container_resource_limits{resource=\"cpu\"}) / sum(kube_node_status_allocatable{resource=\"cpu\"})", "format": "time_series", "instant": true, "intervalFactor": 2, @@ -286,7 +286,7 @@ "steppedLine": false, "targets": [ { - "expr": "1 - sum(:node_memory_MemAvailable_bytes:sum) / sum(node_memory_MemTotal_bytes{app=\"node-exporter\"})", + "expr": "1 - sum(:node_memory_MemAvailable_bytes:sum) / sum(node_memory_MemTotal_bytes{job=\"node-exporter\"})", "format": "time_series", "instant": true, "intervalFactor": 2, @@ -365,7 +365,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(kube_pod_container_resource_requests{app=\"kube-state-metrics\", resource=\"memory\"}) / sum(kube_node_status_allocatable{app=\"kube-state-metrics\", resource=\"memory\"})", + "expr": "sum(kube_pod_container_resource_requests{resource=\"memory\"}) / sum(kube_node_status_allocatable{resource=\"memory\"})", "format": "time_series", "instant": true, "intervalFactor": 2, @@ -444,7 +444,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(kube_pod_container_resource_limits{app=\"kube-state-metrics\", resource=\"memory\"}) / sum(kube_node_status_allocatable{app=\"kube-state-metrics\", resource=\"memory\"})", + "expr": "sum(kube_pod_container_resource_limits{resource=\"memory\"}) / sum(kube_node_status_allocatable{resource=\"memory\"})", "format": "time_series", "instant": true, "intervalFactor": 2, @@ -743,7 +743,7 @@ "step": 10 }, { - "expr": "sum(kube_pod_container_resource_requests{app=\"kube-state-metrics\", resource=\"cpu\"}) by (cluster_id)", + "expr": "sum(kube_pod_container_resource_requests{resource=\"cpu\"}) by (cluster_id)", "format": "table", "instant": true, "intervalFactor": 2, @@ -752,7 +752,7 @@ "step": 10 }, { - "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate) by (cluster_id) / sum(kube_pod_container_resource_requests{app=\"kube-state-metrics\", resource=\"cpu\"}) by (cluster_id)", + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate) by (cluster_id) / sum(kube_pod_container_resource_requests{resource=\"cpu\"}) by (cluster_id)", "format": "table", "instant": true, "intervalFactor": 2, @@ -761,7 +761,7 @@ "step": 10 }, { - "expr": "sum(kube_pod_container_resource_limits{app=\"kube-state-metrics\", resource=\"cpu\"}) by (cluster_id)", + "expr": "sum(kube_pod_container_resource_limits{resource=\"cpu\"}) by (cluster_id)", "format": "table", "instant": true, "intervalFactor": 2, @@ -770,7 +770,7 @@ "step": 10 }, { - "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate) by (cluster_id) / sum(kube_pod_container_resource_limits{app=\"kube-state-metrics\", resource=\"cpu\"}) by (cluster_id)", + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate) by (cluster_id) / sum(kube_pod_container_resource_limits{resource=\"cpu\"}) by (cluster_id)", "format": "table", "instant": true, "intervalFactor": 2, @@ -863,7 +863,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(container_memory_rss{app=\"cadvisor\", container!=\"\"}) by (cluster_id)", + "expr": "sum(container_memory_rss{container!=\"\"}) by (cluster_id)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{cluster_id}}", @@ -1063,7 +1063,7 @@ ], "targets": [ { - "expr": "sum(container_memory_rss{app=\"cadvisor\", container!=\"\"}) by (cluster_id)", + "expr": "sum(container_memory_rss{container!=\"\"}) by (cluster_id)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1072,7 +1072,7 @@ "step": 10 }, { - "expr": "sum(kube_pod_container_resource_requests{app=\"kube-state-metrics\", resource=\"memory\"}) by (cluster_id)", + "expr": "sum(kube_pod_container_resource_requests{resource=\"memory\"}) by (cluster_id)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1081,7 +1081,7 @@ "step": 10 }, { - "expr": "sum(container_memory_rss{app=\"cadvisor\", container!=\"\"}) by (cluster_id) / sum(kube_pod_container_resource_requests{app=\"kube-state-metrics\", resource=\"memory\"}) by (cluster_id)", + "expr": "sum(container_memory_rss{container!=\"\"}) by (cluster_id) / sum(kube_pod_container_resource_requests{resource=\"memory\"}) by (cluster_id)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1090,7 +1090,7 @@ "step": 10 }, { - "expr": "sum(kube_pod_container_resource_limits{app=\"kube-state-metrics\", resource=\"memory\"}) by (cluster_id)", + "expr": "sum(kube_pod_container_resource_limits{resource=\"memory\"}) by (cluster_id)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1099,7 +1099,7 @@ "step": 10 }, { - "expr": "sum(container_memory_rss{app=\"cadvisor\", container!=\"\"}) by (cluster_id) / sum(kube_pod_container_resource_limits{app=\"kube-state-metrics\", resource=\"memory\"}) by (cluster_id)", + "expr": "sum(container_memory_rss{container!=\"\"}) by (cluster_id) / sum(kube_pod_container_resource_limits{resource=\"memory\"}) by (cluster_id)", "format": "table", "instant": true, "intervalFactor": 2, diff --git a/helm/dashboards/dashboards/mixin/k8s-resources-namespace.json b/helm/dashboards/dashboards/mixin/k8s-resources-namespace.json index d2c449a1..0cd31867 100644 --- a/helm/dashboards/dashboards/mixin/k8s-resources-namespace.json +++ b/helm/dashboards/dashboards/mixin/k8s-resources-namespace.json @@ -49,7 +49,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster_id=\"$cluster\", namespace=\"$namespace\"}) / sum(kube_pod_container_resource_requests{app=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"})", + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster_id=\"$cluster\", namespace=\"$namespace\"}) / sum(kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"})", "format": "time_series", "instant": true, "intervalFactor": 2, @@ -128,7 +128,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster_id=\"$cluster\", namespace=\"$namespace\"}) / sum(kube_pod_container_resource_limits{app=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"})", + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster_id=\"$cluster\", namespace=\"$namespace\"}) / sum(kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"})", "format": "time_series", "instant": true, "intervalFactor": 2, @@ -207,7 +207,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(container_memory_working_set_bytes{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\",container!=\"\", image!=\"\"}) / sum(kube_pod_container_resource_requests{app=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"})", + "expr": "sum(container_memory_working_set_bytes{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\",container!=\"\", image!=\"\"}) / sum(kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"})", "format": "time_series", "instant": true, "intervalFactor": 2, @@ -286,7 +286,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(container_memory_working_set_bytes{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\",container!=\"\", image!=\"\"}) / sum(kube_pod_container_resource_limits{app=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"})", + "expr": "sum(container_memory_working_set_bytes{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\",container!=\"\", image!=\"\"}) / sum(kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"})", "format": "time_series", "instant": true, "intervalFactor": 2, @@ -767,7 +767,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(container_memory_working_set_bytes{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}) by (pod)", + "expr": "sum(container_memory_working_set_bytes{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}) by (pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{pod}}", @@ -1028,7 +1028,7 @@ ], "targets": [ { - "expr": "sum(container_memory_working_set_bytes{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\",container!=\"\", image!=\"\"}) by (pod)", + "expr": "sum(container_memory_working_set_bytes{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\",container!=\"\", image!=\"\"}) by (pod)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1046,7 +1046,7 @@ "step": 10 }, { - "expr": "sum(container_memory_working_set_bytes{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\",container!=\"\", image!=\"\"}) by (pod) / sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_requests{cluster_id=\"$cluster\", namespace=\"$namespace\"}) by (pod)", + "expr": "sum(container_memory_working_set_bytes{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\",container!=\"\", image!=\"\"}) by (pod) / sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_requests{cluster_id=\"$cluster\", namespace=\"$namespace\"}) by (pod)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1064,7 +1064,7 @@ "step": 10 }, { - "expr": "sum(container_memory_working_set_bytes{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\",container!=\"\", image!=\"\"}) by (pod) / sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_limits{cluster_id=\"$cluster\", namespace=\"$namespace\"}) by (pod)", + "expr": "sum(container_memory_working_set_bytes{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\",container!=\"\", image!=\"\"}) by (pod) / sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_limits{cluster_id=\"$cluster\", namespace=\"$namespace\"}) by (pod)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1073,7 +1073,7 @@ "step": 10 }, { - "expr": "sum(container_memory_rss{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\",container!=\"\"}) by (pod)", + "expr": "sum(container_memory_rss{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\",container!=\"\"}) by (pod)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1082,7 +1082,7 @@ "step": 10 }, { - "expr": "sum(container_memory_cache{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\",container!=\"\"}) by (pod)", + "expr": "sum(container_memory_cache{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\",container!=\"\"}) by (pod)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1091,7 +1091,7 @@ "step": 10 }, { - "expr": "sum(container_memory_swap{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\",container!=\"\"}) by (pod)", + "expr": "sum(container_memory_swap{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\",container!=\"\"}) by (pod)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1308,7 +1308,7 @@ ], "targets": [ { - "expr": "sum(irate(container_network_receive_bytes_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)", + "expr": "sum(irate(container_network_receive_bytes_total{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1317,7 +1317,7 @@ "step": 10 }, { - "expr": "sum(irate(container_network_transmit_bytes_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)", + "expr": "sum(irate(container_network_transmit_bytes_total{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1326,7 +1326,7 @@ "step": 10 }, { - "expr": "sum(irate(container_network_receive_packets_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)", + "expr": "sum(irate(container_network_receive_packets_total{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1335,7 +1335,7 @@ "step": 10 }, { - "expr": "sum(irate(container_network_transmit_packets_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)", + "expr": "sum(irate(container_network_transmit_packets_total{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1344,7 +1344,7 @@ "step": 10 }, { - "expr": "sum(irate(container_network_receive_packets_dropped_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)", + "expr": "sum(irate(container_network_receive_packets_dropped_total{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)", "format": "table", "instant": true, "intervalFactor": 2, @@ -1353,7 +1353,7 @@ "step": 10 }, { - "expr": "sum(irate(container_network_transmit_packets_dropped_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)", + "expr": "sum(irate(container_network_transmit_packets_dropped_total{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)", "format": "table", "instant": true, "intervalFactor": 2, @@ -2255,7 +2255,7 @@ ], "targets": [ { - "expr": "sum by(pod) (rate(container_fs_reads_total{app=\"cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]))", + "expr": "sum by(pod) (rate(container_fs_reads_total{metrics_path=\"/metrics/cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, @@ -2264,7 +2264,7 @@ "step": 10 }, { - "expr": "sum by(pod) (rate(container_fs_writes_total{app=\"cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]))", + "expr": "sum by(pod) (rate(container_fs_writes_total{metrics_path=\"/metrics/cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, @@ -2273,7 +2273,7 @@ "step": 10 }, { - "expr": "sum by(pod) (rate(container_fs_reads_total{app=\"cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]) + rate(container_fs_writes_total{app=\"cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]))", + "expr": "sum by(pod) (rate(container_fs_reads_total{metrics_path=\"/metrics/cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]) + rate(container_fs_writes_total{metrics_path=\"/metrics/cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, @@ -2282,7 +2282,7 @@ "step": 10 }, { - "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{app=\"cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]))", + "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{metrics_path=\"/metrics/cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, @@ -2291,7 +2291,7 @@ "step": 10 }, { - "expr": "sum by(pod) (rate(container_fs_writes_bytes_total{app=\"cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]))", + "expr": "sum by(pod) (rate(container_fs_writes_bytes_total{metrics_path=\"/metrics/cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, @@ -2300,7 +2300,7 @@ "step": 10 }, { - "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{app=\"cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{app=\"cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]))", + "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{metrics_path=\"/metrics/cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{metrics_path=\"/metrics/cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, @@ -2390,7 +2390,7 @@ "multi": false, "name": "cluster", "options": [], - "query": "label_values(up{app=\"kube-state-metrics\"}, cluster_id)", + "query": "label_values(up{job=\"kube-state-metrics\"}, cluster_id)", "refresh": 2, "regex": "", "sort": 1, @@ -2413,7 +2413,7 @@ "multi": false, "name": "namespace", "options": [], - "query": "label_values(kube_namespace_status_phase{app=\"kube-state-metrics\", cluster_id=\"$cluster\"}, namespace)", + "query": "label_values(kube_namespace_status_phase{job=\"kube-state-metrics\", cluster_id=\"$cluster\"}, namespace)", "refresh": 2, "regex": "", "sort": 1, diff --git a/helm/dashboards/dashboards/mixin/k8s-resources-node.json b/helm/dashboards/dashboards/mixin/k8s-resources-node.json index c78bc8d0..a62be0f7 100644 --- a/helm/dashboards/dashboards/mixin/k8s-resources-node.json +++ b/helm/dashboards/dashboards/mixin/k8s-resources-node.json @@ -1101,7 +1101,7 @@ "multi": false, "name": "cluster", "options": [], - "query": "label_values(up{app=\"kube-state-metrics\"}, cluster_id)", + "query": "label_values(up{job=\"kube-state-metrics\"}, cluster_id)", "refresh": 2, "regex": "", "skipUrlSync": false, diff --git a/helm/dashboards/dashboards/mixin/k8s-resources-pod.json b/helm/dashboards/dashboards/mixin/k8s-resources-pod.json index 4002a231..84d31366 100644 --- a/helm/dashboards/dashboards/mixin/k8s-resources-pod.json +++ b/helm/dashboards/dashboards/mixin/k8s-resources-pod.json @@ -75,7 +75,7 @@ "step": 10 }, { - "expr": "sum(\n kube_pod_container_resource_requests{app=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", resource=\"cpu\"}\n)\n", + "expr": "sum(\n kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", resource=\"cpu\"}\n)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "requests", @@ -83,7 +83,7 @@ "step": 10 }, { - "expr": "sum(\n kube_pod_container_resource_limits{app=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", resource=\"cpu\"}\n)\n", + "expr": "sum(\n kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", resource=\"cpu\"}\n)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "limits", @@ -174,7 +174,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(increase(container_cpu_cfs_throttled_periods_total{app=\"cadvisor\", namespace=\"$namespace\", pod=\"$pod\", container!=\"\", cluster_id=\"$cluster\"}[$__rate_interval])) by (container) /sum(increase(container_cpu_cfs_periods_total{app=\"cadvisor\", namespace=\"$namespace\", pod=\"$pod\", container!=\"\", cluster_id=\"$cluster\"}[$__rate_interval])) by (container)", + "expr": "sum(increase(container_cpu_cfs_throttled_periods_total{namespace=\"$namespace\", pod=\"$pod\", container!=\"\", cluster_id=\"$cluster\"}[$__rate_interval])) by (container) /sum(increase(container_cpu_cfs_periods_total{namespace=\"$namespace\", pod=\"$pod\", container!=\"\", cluster_id=\"$cluster\"}[$__rate_interval])) by (container)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{container}}", @@ -533,7 +533,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(container_memory_working_set_bytes{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"\", image!=\"\"}) by (container)", + "expr": "sum(container_memory_working_set_bytes{cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"\", image!=\"\"}) by (container)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{container}}", @@ -541,7 +541,7 @@ "step": 10 }, { - "expr": "sum(\n kube_pod_container_resource_requests{app=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", resource=\"memory\"}\n)\n", + "expr": "sum(\n kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", resource=\"memory\"}\n)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "requests", @@ -549,7 +549,7 @@ "step": 10 }, { - "expr": "sum(\n kube_pod_container_resource_limits{app=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", resource=\"memory\"}\n)\n", + "expr": "sum(\n kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", resource=\"memory\"}\n)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "limits", @@ -794,7 +794,7 @@ ], "targets": [ { - "expr": "sum(container_memory_working_set_bytes{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"\", image!=\"\"}) by (container)", + "expr": "sum(container_memory_working_set_bytes{cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"\", image!=\"\"}) by (container)", "format": "table", "instant": true, "intervalFactor": 2, @@ -812,7 +812,7 @@ "step": 10 }, { - "expr": "sum(container_memory_working_set_bytes{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", image!=\"\"}) by (container) / sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_requests{cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)", + "expr": "sum(container_memory_working_set_bytes{cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", image!=\"\"}) by (container) / sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_requests{cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)", "format": "table", "instant": true, "intervalFactor": 2, @@ -830,7 +830,7 @@ "step": 10 }, { - "expr": "sum(container_memory_working_set_bytes{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"\", image!=\"\"}) by (container) / sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_limits{cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)", + "expr": "sum(container_memory_working_set_bytes{cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"\", image!=\"\"}) by (container) / sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_limits{cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)", "format": "table", "instant": true, "intervalFactor": 2, @@ -839,7 +839,7 @@ "step": 10 }, { - "expr": "sum(container_memory_rss{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container != \"\", container != \"POD\"}) by (container)", + "expr": "sum(container_memory_rss{cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container != \"\", container != \"POD\"}) by (container)", "format": "table", "instant": true, "intervalFactor": 2, @@ -848,7 +848,7 @@ "step": 10 }, { - "expr": "sum(container_memory_cache{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container != \"\", container != \"POD\"}) by (container)", + "expr": "sum(container_memory_cache{cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container != \"\", container != \"POD\"}) by (container)", "format": "table", "instant": true, "intervalFactor": 2, @@ -857,7 +857,7 @@ "step": 10 }, { - "expr": "sum(container_memory_swap{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container != \"\", container != \"POD\"}) by (container)", + "expr": "sum(container_memory_swap{cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container != \"\", container != \"POD\"}) by (container)", "format": "table", "instant": true, "intervalFactor": 2, @@ -950,7 +950,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(irate(container_network_receive_bytes_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", + "expr": "sum(irate(container_network_receive_bytes_total{cluster_id=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{pod}}", @@ -1029,7 +1029,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(irate(container_network_transmit_bytes_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", + "expr": "sum(irate(container_network_transmit_bytes_total{cluster_id=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{pod}}", @@ -1120,7 +1120,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(irate(container_network_receive_packets_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", + "expr": "sum(irate(container_network_receive_packets_total{cluster_id=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{pod}}", @@ -1199,7 +1199,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(irate(container_network_transmit_packets_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", + "expr": "sum(irate(container_network_transmit_packets_total{cluster_id=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{pod}}", @@ -1290,7 +1290,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(irate(container_network_receive_packets_dropped_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", + "expr": "sum(irate(container_network_receive_packets_dropped_total{cluster_id=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{pod}}", @@ -1369,7 +1369,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(irate(container_network_transmit_packets_dropped_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", + "expr": "sum(irate(container_network_transmit_packets_dropped_total{cluster_id=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{pod}}", @@ -1461,7 +1461,7 @@ "steppedLine": false, "targets": [ { - "expr": "ceil(sum by(pod) (rate(container_fs_reads_total{app=\"cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])))", + "expr": "ceil(sum by(pod) (rate(container_fs_reads_total{device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])))", "format": "time_series", "intervalFactor": 2, "legendFormat": "Reads", @@ -1469,7 +1469,7 @@ "step": 10 }, { - "expr": "ceil(sum by(pod) (rate(container_fs_writes_total{app=\"cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\",namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])))", + "expr": "ceil(sum by(pod) (rate(container_fs_writes_total{device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\",namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])))", "format": "time_series", "intervalFactor": 2, "legendFormat": "Writes", @@ -1548,7 +1548,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{app=\"cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval]))", + "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "Reads", @@ -1556,7 +1556,7 @@ "step": 10 }, { - "expr": "sum by(pod) (rate(container_fs_writes_bytes_total{app=\"cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval]))", + "expr": "sum by(pod) (rate(container_fs_writes_bytes_total{device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "Writes", @@ -1648,7 +1648,7 @@ "steppedLine": false, "targets": [ { - "expr": "ceil(sum by(container) (rate(container_fs_reads_total{app=\"cadvisor\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]) + rate(container_fs_writes_total{app=\"cadvisor\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval])))", + "expr": "ceil(sum by(container) (rate(container_fs_reads_total{container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]) + rate(container_fs_writes_total{container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval])))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{container}}", @@ -1727,7 +1727,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by(container) (rate(container_fs_reads_bytes_total{app=\"cadvisor\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{app=\"cadvisor\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", + "expr": "sum by(container) (rate(container_fs_reads_bytes_total{container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{container}}", @@ -1946,7 +1946,7 @@ ], "targets": [ { - "expr": "sum by(container) (rate(container_fs_reads_total{app=\"cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", + "expr": "sum by(container) (rate(container_fs_reads_total{device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, @@ -1955,7 +1955,7 @@ "step": 10 }, { - "expr": "sum by(container) (rate(container_fs_writes_total{app=\"cadvisor\",device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", + "expr": "sum by(container) (rate(container_fs_writes_total{container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, @@ -1964,7 +1964,7 @@ "step": 10 }, { - "expr": "sum by(container) (rate(container_fs_reads_total{app=\"cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]) + rate(container_fs_writes_total{app=\"cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", + "expr": "sum by(container) (rate(container_fs_reads_total{device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]) + rate(container_fs_writes_total{device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, @@ -1973,7 +1973,7 @@ "step": 10 }, { - "expr": "sum by(container) (rate(container_fs_reads_bytes_total{app=\"cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", + "expr": "sum by(container) (rate(container_fs_reads_bytes_total{device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, @@ -1982,7 +1982,7 @@ "step": 10 }, { - "expr": "sum by(container) (rate(container_fs_writes_bytes_total{app=\"cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", + "expr": "sum by(container) (rate(container_fs_writes_bytes_total{device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, @@ -1991,7 +1991,7 @@ "step": 10 }, { - "expr": "sum by(container) (rate(container_fs_reads_bytes_total{app=\"cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{app=\"cadvisor\", device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", + "expr": "sum by(container) (rate(container_fs_reads_bytes_total{device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{device=~\"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\", container!=\"\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))", "format": "table", "instant": true, "intervalFactor": 2, @@ -2081,7 +2081,7 @@ "multi": false, "name": "cluster", "options": [], - "query": "label_values(up{app=\"kube-state-metrics\"}, cluster_id)", + "query": "label_values(up{job=\"kube-state-metrics\"}, cluster_id)", "refresh": 2, "regex": "", "sort": 1, @@ -2104,7 +2104,7 @@ "multi": false, "name": "namespace", "options": [], - "query": "label_values(kube_namespace_status_phase{app=\"kube-state-metrics\", cluster_id=\"$cluster\"}, namespace)", + "query": "label_values(kube_namespace_status_phase{job=\"kube-state-metrics\", cluster_id=\"$cluster\"}, namespace)", "refresh": 2, "regex": "", "sort": 1, @@ -2127,7 +2127,7 @@ "multi": false, "name": "pod", "options": [], - "query": "label_values(kube_pod_info{app=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\"}, pod)", + "query": "label_values(kube_pod_info{job=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\"}, pod)", "refresh": 2, "regex": "", "sort": 1, diff --git a/helm/dashboards/dashboards/mixin/k8s-resources-workloads-namespace.json b/helm/dashboards/dashboards/mixin/k8s-resources-workloads-namespace.json index ea02e122..bbefc2b4 100644 --- a/helm/dashboards/dashboards/mixin/k8s-resources-workloads-namespace.json +++ b/helm/dashboards/dashboards/mixin/k8s-resources-workloads-namespace.json @@ -335,7 +335,7 @@ "step": 10 }, { - "expr": "sum(\n kube_pod_container_resource_requests{app=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "expr": "sum(\n kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -344,7 +344,7 @@ "step": 10 }, { - "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster_id=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_requests{app=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster_id=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -353,7 +353,7 @@ "step": 10 }, { - "expr": "sum(\n kube_pod_container_resource_limits{app=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "expr": "sum(\n kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -362,7 +362,7 @@ "step": 10 }, { - "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster_id=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_limits{app=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster_id=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -478,7 +478,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(\n container_memory_working_set_bytes{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "expr": "sum(\n container_memory_working_set_bytes{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{workload}} - {{workload_type}}", @@ -733,7 +733,7 @@ "step": 10 }, { - "expr": "sum(\n container_memory_working_set_bytes{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "expr": "sum(\n container_memory_working_set_bytes{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -742,7 +742,7 @@ "step": 10 }, { - "expr": "sum(\n kube_pod_container_resource_requests{app=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "expr": "sum(\n kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -751,7 +751,7 @@ "step": 10 }, { - "expr": "sum(\n container_memory_working_set_bytes{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_requests{app=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "expr": "sum(\n container_memory_working_set_bytes{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -760,7 +760,7 @@ "step": 10 }, { - "expr": "sum(\n kube_pod_container_resource_limits{app=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "expr": "sum(\n kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -769,7 +769,7 @@ "step": 10 }, { - "expr": "sum(\n container_memory_working_set_bytes{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_limits{app=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "expr": "sum(\n container_memory_working_set_bytes{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -1001,7 +1001,7 @@ ], "targets": [ { - "expr": "(sum(irate(container_network_receive_bytes_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", + "expr": "(sum(irate(container_network_receive_bytes_total{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -1010,7 +1010,7 @@ "step": 10 }, { - "expr": "(sum(irate(container_network_transmit_bytes_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", + "expr": "(sum(irate(container_network_transmit_bytes_total{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -1019,7 +1019,7 @@ "step": 10 }, { - "expr": "(sum(irate(container_network_receive_packets_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", + "expr": "(sum(irate(container_network_receive_packets_total{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -1028,7 +1028,7 @@ "step": 10 }, { - "expr": "(sum(irate(container_network_transmit_packets_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", + "expr": "(sum(irate(container_network_transmit_packets_total{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -1037,7 +1037,7 @@ "step": 10 }, { - "expr": "(sum(irate(container_network_receive_packets_dropped_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", + "expr": "(sum(irate(container_network_receive_packets_dropped_total{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -1046,7 +1046,7 @@ "step": 10 }, { - "expr": "(sum(irate(container_network_transmit_packets_dropped_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", + "expr": "(sum(irate(container_network_transmit_packets_dropped_total{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}) by (workload))\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -1139,7 +1139,7 @@ "steppedLine": false, "targets": [ { - "expr": "(sum(irate(container_network_receive_bytes_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "(sum(irate(container_network_receive_bytes_total{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{workload}}", @@ -1218,7 +1218,7 @@ "steppedLine": false, "targets": [ { - "expr": "(sum(irate(container_network_transmit_bytes_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "(sum(irate(container_network_transmit_bytes_total{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{workload}}", @@ -1309,7 +1309,7 @@ "steppedLine": false, "targets": [ { - "expr": "(avg(irate(container_network_receive_bytes_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "(avg(irate(container_network_receive_bytes_total{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{workload}}", @@ -1388,7 +1388,7 @@ "steppedLine": false, "targets": [ { - "expr": "(avg(irate(container_network_transmit_bytes_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "(avg(irate(container_network_transmit_bytes_total{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{workload}}", @@ -1479,7 +1479,7 @@ "steppedLine": false, "targets": [ { - "expr": "(sum(irate(container_network_receive_packets_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "(sum(irate(container_network_receive_packets_total{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{workload}}", @@ -1558,7 +1558,7 @@ "steppedLine": false, "targets": [ { - "expr": "(sum(irate(container_network_transmit_packets_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "(sum(irate(container_network_transmit_packets_total{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{workload}}", @@ -1649,7 +1649,7 @@ "steppedLine": false, "targets": [ { - "expr": "(sum(irate(container_network_receive_packets_dropped_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "(sum(irate(container_network_receive_packets_dropped_total{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{workload}}", @@ -1728,7 +1728,7 @@ "steppedLine": false, "targets": [ { - "expr": "(sum(irate(container_network_transmit_packets_dropped_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "expr": "(sum(irate(container_network_transmit_packets_dropped_total{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster_id=\"$cluster\", namespace=\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{workload}}", @@ -1816,7 +1816,7 @@ "multi": false, "name": "cluster", "options": [], - "query": "label_values(up{app=\"kube-state-metrics\"}, cluster_id)", + "query": "label_values(up{job=\"kube-state-metrics\"}, cluster_id)", "refresh": 2, "regex": "", "sort": 1, @@ -1839,7 +1839,7 @@ "multi": false, "name": "namespace", "options": [], - "query": "label_values(kube_pod_info{app=\"kube-state-metrics\", cluster_id=\"$cluster\"}, namespace)", + "query": "label_values(kube_pod_info{job=\"kube-state-metrics\", cluster_id=\"$cluster\"}, namespace)", "refresh": 2, "regex": "", "sort": 1, diff --git a/helm/dashboards/dashboards/mixin/persistentvolumesusage.json b/helm/dashboards/dashboards/mixin/persistentvolumesusage.json index bdfecf7a..711f9f70 100644 --- a/helm/dashboards/dashboards/mixin/persistentvolumesusage.json +++ b/helm/dashboards/dashboards/mixin/persistentvolumesusage.json @@ -55,14 +55,14 @@ "steppedLine": false, "targets": [ { - "expr": "(\n sum without(instance, node) (topk(1, (kubelet_volume_stats_capacity_bytes{cluster_id=\"$cluster\", app=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})))\n -\n sum without(instance, node) (topk(1, (kubelet_volume_stats_available_bytes{cluster_id=\"$cluster\", app=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})))\n)\n", + "expr": "(\n sum without(instance, node) (topk(1, (kubelet_volume_stats_capacity_bytes{cluster_id=\"$cluster\", job=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})))\n -\n sum without(instance, node) (topk(1, (kubelet_volume_stats_available_bytes{cluster_id=\"$cluster\", job=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})))\n)\n", "format": "time_series", "intervalFactor": 1, "legendFormat": "Used Space", "refId": "A" }, { - "expr": "sum without(instance, node) (topk(1, (kubelet_volume_stats_available_bytes{cluster_id=\"$cluster\", app=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})))\n", + "expr": "sum without(instance, node) (topk(1, (kubelet_volume_stats_available_bytes{cluster_id=\"$cluster\", job=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})))\n", "format": "time_series", "intervalFactor": 1, "legendFormat": "Free Space", @@ -166,7 +166,7 @@ "tableColumn": "", "targets": [ { - "expr": "max without(instance,node) (\n(\n topk(1, kubelet_volume_stats_capacity_bytes{cluster_id=\"$cluster\", app=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n -\n topk(1, kubelet_volume_stats_available_bytes{cluster_id=\"$cluster\", app=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n)\n/\ntopk(1, kubelet_volume_stats_capacity_bytes{cluster_id=\"$cluster\", app=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n* 100)\n", + "expr": "max without(instance,node) (\n(\n topk(1, kubelet_volume_stats_capacity_bytes{cluster_id=\"$cluster\", job=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n -\n topk(1, kubelet_volume_stats_available_bytes{cluster_id=\"$cluster\", job=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n)\n/\ntopk(1, kubelet_volume_stats_capacity_bytes{cluster_id=\"$cluster\", job=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n* 100)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "", @@ -241,14 +241,14 @@ "steppedLine": false, "targets": [ { - "expr": "sum without(instance, node) (topk(1, (kubelet_volume_stats_inodes_used{cluster_id=\"$cluster\", app=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})))\n", + "expr": "sum without(instance, node) (topk(1, (kubelet_volume_stats_inodes_used{cluster_id=\"$cluster\", job=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})))\n", "format": "time_series", "intervalFactor": 1, "legendFormat": "Used inodes", "refId": "A" }, { - "expr": "(\n sum without(instance, node) (topk(1, (kubelet_volume_stats_inodes{cluster_id=\"$cluster\", app=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})))\n -\n sum without(instance, node) (topk(1, (kubelet_volume_stats_inodes_used{cluster_id=\"$cluster\", app=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})))\n)\n", + "expr": "(\n sum without(instance, node) (topk(1, (kubelet_volume_stats_inodes{cluster_id=\"$cluster\", job=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})))\n -\n sum without(instance, node) (topk(1, (kubelet_volume_stats_inodes_used{cluster_id=\"$cluster\", job=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})))\n)\n", "format": "time_series", "intervalFactor": 1, "legendFormat": " Free inodes", @@ -352,7 +352,7 @@ "tableColumn": "", "targets": [ { - "expr": "max without(instance,node) (\ntopk(1, kubelet_volume_stats_inodes_used{cluster_id=\"$cluster\", app=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n/\ntopk(1, kubelet_volume_stats_inodes{cluster_id=\"$cluster\", app=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n* 100)\n", + "expr": "max without(instance,node) (\ntopk(1, kubelet_volume_stats_inodes_used{cluster_id=\"$cluster\", job=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n/\ntopk(1, kubelet_volume_stats_inodes{cluster_id=\"$cluster\", job=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n* 100)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "", @@ -417,7 +417,7 @@ "multi": false, "name": "cluster", "options": [], - "query": "label_values(kubelet_volume_stats_capacity_bytes{app=\"kubelet\"}, cluster_id)", + "query": "label_values(kubelet_volume_stats_capacity_bytes{job=\"kubelet\"}, cluster_id)", "refresh": 2, "regex": "", "sort": 1, @@ -437,7 +437,7 @@ "multi": false, "name": "namespace", "options": [], - "query": "label_values(kubelet_volume_stats_capacity_bytes{cluster_id=\"$cluster\", app=\"kubelet\"}, namespace)", + "query": "label_values(kubelet_volume_stats_capacity_bytes{cluster_id=\"$cluster\", job=\"kubelet\"}, namespace)", "refresh": 2, "regex": "", "sort": 1, @@ -457,7 +457,7 @@ "multi": false, "name": "volume", "options": [], - "query": "label_values(kubelet_volume_stats_capacity_bytes{cluster_id=\"$cluster\", app=\"kubelet\", namespace=\"$namespace\"}, persistentvolumeclaim)", + "query": "label_values(kubelet_volume_stats_capacity_bytes{cluster_id=\"$cluster\", job=\"kubelet\", namespace=\"$namespace\"}, persistentvolumeclaim)", "refresh": 2, "regex": "", "sort": 1, diff --git a/helm/dashboards/dashboards/mixin/scheduler.json b/helm/dashboards/dashboards/mixin/scheduler.json index 677a5dda..b3202a49 100644 --- a/helm/dashboards/dashboards/mixin/scheduler.json +++ b/helm/dashboards/dashboards/mixin/scheduler.json @@ -77,7 +77,7 @@ "tableColumn": "", "targets": [ { - "expr": "sum(up{cluster_id=\"$cluster\", app=\"kube-scheduler\"})", + "expr": "sum(up{cluster_id=\"$cluster\", job=\"kube-scheduler\"})", "format": "time_series", "intervalFactor": 2, "legendFormat": "", @@ -139,28 +139,28 @@ "steppedLine": false, "targets": [ { - "expr": "sum(rate(scheduler_e2e_scheduling_duration_seconds_count{cluster_id=\"$cluster\", app=\"kube-scheduler\", instance=~\"$instance\"}[$__rate_interval])) by (cluster_id, instance)", + "expr": "sum(rate(scheduler_e2e_scheduling_duration_seconds_count{cluster_id=\"$cluster\", job=\"kube-scheduler\", instance=~\"$instance\"}[$__rate_interval])) by (cluster_id, instance)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{cluster_id}} {{instance}} e2e", "refId": "A" }, { - "expr": "sum(rate(scheduler_binding_duration_seconds_count{cluster_id=\"$cluster\", app=\"kube-scheduler\", instance=~\"$instance\"}[$__rate_interval])) by (cluster_id, instance)", + "expr": "sum(rate(scheduler_binding_duration_seconds_count{cluster_id=\"$cluster\", job=\"kube-scheduler\", instance=~\"$instance\"}[$__rate_interval])) by (cluster_id, instance)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{cluster_id}} {{instance}} binding", "refId": "B" }, { - "expr": "sum(rate(scheduler_scheduling_algorithm_duration_seconds_count{cluster_id=\"$cluster\", app=\"kube-scheduler\", instance=~\"$instance\"}[$__rate_interval])) by (cluster_id, instance)", + "expr": "sum(rate(scheduler_scheduling_algorithm_duration_seconds_count{cluster_id=\"$cluster\", job=\"kube-scheduler\", instance=~\"$instance\"}[$__rate_interval])) by (cluster_id, instance)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{cluster_id}} {{instance}} scheduling algorithm", "refId": "C" }, { - "expr": "sum(rate(scheduler_volume_scheduling_duration_seconds_count{cluster_id=\"$cluster\", app=\"kube-scheduler\", instance=~\"$instance\"}[$__rate_interval])) by (cluster_id, instance)", + "expr": "sum(rate(scheduler_volume_scheduling_duration_seconds_count{cluster_id=\"$cluster\", job=\"kube-scheduler\", instance=~\"$instance\"}[$__rate_interval])) by (cluster_id, instance)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{cluster_id}} {{instance}} volume", @@ -242,28 +242,28 @@ "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.99, sum(rate(scheduler_e2e_scheduling_duration_seconds_bucket{cluster_id=\"$cluster\", app=\"kube-scheduler\",instance=~\"$instance\"}[$__rate_interval])) by (cluster_id, instance, le))", + "expr": "histogram_quantile(0.99, sum(rate(scheduler_e2e_scheduling_duration_seconds_bucket{cluster_id=\"$cluster\", job=\"kube-scheduler\",instance=~\"$instance\"}[$__rate_interval])) by (cluster_id, instance, le))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{cluster_id}} {{instance}} e2e", "refId": "A" }, { - "expr": "histogram_quantile(0.99, sum(rate(scheduler_binding_duration_seconds_bucket{cluster_id=\"$cluster\", app=\"kube-scheduler\",instance=~\"$instance\"}[$__rate_interval])) by (cluster_id, instance, le))", + "expr": "histogram_quantile(0.99, sum(rate(scheduler_binding_duration_seconds_bucket{cluster_id=\"$cluster\", job=\"kube-scheduler\",instance=~\"$instance\"}[$__rate_interval])) by (cluster_id, instance, le))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{cluster_id}} {{instance}} binding", "refId": "B" }, { - "expr": "histogram_quantile(0.99, sum(rate(scheduler_scheduling_algorithm_duration_seconds_bucket{cluster_id=\"$cluster\", app=\"kube-scheduler\",instance=~\"$instance\"}[$__rate_interval])) by (cluster_id, instance, le))", + "expr": "histogram_quantile(0.99, sum(rate(scheduler_scheduling_algorithm_duration_seconds_bucket{cluster_id=\"$cluster\", job=\"kube-scheduler\",instance=~\"$instance\"}[$__rate_interval])) by (cluster_id, instance, le))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{cluster_id}} {{instance}} scheduling algorithm", "refId": "C" }, { - "expr": "histogram_quantile(0.99, sum(rate(scheduler_volume_scheduling_duration_seconds_bucket{cluster_id=\"$cluster\", app=\"kube-scheduler\",instance=~\"$instance\"}[$__rate_interval])) by (cluster_id, instance, le))", + "expr": "histogram_quantile(0.99, sum(rate(scheduler_volume_scheduling_duration_seconds_bucket{cluster_id=\"$cluster\", job=\"kube-scheduler\",instance=~\"$instance\"}[$__rate_interval])) by (cluster_id, instance, le))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{cluster_id}} {{instance}} volume", @@ -358,28 +358,28 @@ "steppedLine": false, "targets": [ { - "expr": "sum(rate(rest_client_requests_total{cluster_id=\"$cluster\", app=\"kube-scheduler\", instance=~\"$instance\",code=~\"2..\"}[$__rate_interval]))", + "expr": "sum(rate(rest_client_requests_total{cluster_id=\"$cluster\", job=\"kube-scheduler\", instance=~\"$instance\",code=~\"2..\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "2xx", "refId": "A" }, { - "expr": "sum(rate(rest_client_requests_total{cluster_id=\"$cluster\", app=\"kube-scheduler\", instance=~\"$instance\",code=~\"3..\"}[$__rate_interval]))", + "expr": "sum(rate(rest_client_requests_total{cluster_id=\"$cluster\", job=\"kube-scheduler\", instance=~\"$instance\",code=~\"3..\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "3xx", "refId": "B" }, { - "expr": "sum(rate(rest_client_requests_total{cluster_id=\"$cluster\", app=\"kube-scheduler\", instance=~\"$instance\",code=~\"4..\"}[$__rate_interval]))", + "expr": "sum(rate(rest_client_requests_total{cluster_id=\"$cluster\", job=\"kube-scheduler\", instance=~\"$instance\",code=~\"4..\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "4xx", "refId": "C" }, { - "expr": "sum(rate(rest_client_requests_total{cluster_id=\"$cluster\", app=\"kube-scheduler\", instance=~\"$instance\",code=~\"5..\"}[$__rate_interval]))", + "expr": "sum(rate(rest_client_requests_total{cluster_id=\"$cluster\", job=\"kube-scheduler\", instance=~\"$instance\",code=~\"5..\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "5xx", @@ -461,7 +461,7 @@ "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster_id=\"$cluster\", app=\"kube-scheduler\", instance=~\"$instance\", verb=\"POST\"}[$__rate_interval])) by (verb, url, le))", + "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster_id=\"$cluster\", job=\"kube-scheduler\", instance=~\"$instance\", verb=\"POST\"}[$__rate_interval])) by (verb, url, le))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{verb}} {{url}}", @@ -556,7 +556,7 @@ "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster_id=\"$cluster\", app=\"kube-scheduler\", instance=~\"$instance\", verb=\"GET\"}[$__rate_interval])) by (verb, url, le))", + "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster_id=\"$cluster\", job=\"kube-scheduler\", instance=~\"$instance\", verb=\"GET\"}[$__rate_interval])) by (verb, url, le))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{verb}} {{url}}", @@ -651,7 +651,7 @@ "steppedLine": false, "targets": [ { - "expr": "process_resident_memory_bytes{cluster_id=\"$cluster\", app=\"kube-scheduler\", instance=~\"$instance\"}", + "expr": "process_resident_memory_bytes{cluster_id=\"$cluster\", job=\"kube-scheduler\", instance=~\"$instance\"}", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{instance}}", @@ -733,7 +733,7 @@ "steppedLine": false, "targets": [ { - "expr": "rate(process_cpu_seconds_total{cluster_id=\"$cluster\", app=\"kube-scheduler\", instance=~\"$instance\"}[$__rate_interval])", + "expr": "rate(process_cpu_seconds_total{cluster_id=\"$cluster\", job=\"kube-scheduler\", instance=~\"$instance\"}[$__rate_interval])", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{instance}}", @@ -815,7 +815,7 @@ "steppedLine": false, "targets": [ { - "expr": "go_goroutines{cluster_id=\"$cluster\", app=\"kube-scheduler\",instance=~\"$instance\"}", + "expr": "go_goroutines{cluster_id=\"$cluster\", job=\"kube-scheduler\",instance=~\"$instance\"}", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{instance}}", @@ -900,7 +900,7 @@ "multi": false, "name": "cluster", "options": [], - "query": "label_values(up{app=\"kube-scheduler\"}, cluster_id)", + "query": "label_values(up{job=\"kube-scheduler\"}, cluster_id)", "refresh": 2, "regex": "", "sort": 1, @@ -920,7 +920,7 @@ "multi": false, "name": "instance", "options": [], - "query": "label_values(up{app=\"kube-scheduler\", cluster_id=\"$cluster\"}, instance)", + "query": "label_values(up{job=\"kube-scheduler\", cluster_id=\"$cluster\"}, instance)", "refresh": 2, "regex": "", "sort": 1, diff --git a/helm/dashboards/dashboards/mixin/statefulset.json b/helm/dashboards/dashboards/mixin/statefulset.json index af18ab3a..615d5f33 100644 --- a/helm/dashboards/dashboards/mixin/statefulset.json +++ b/helm/dashboards/dashboards/mixin/statefulset.json @@ -72,7 +72,7 @@ "tableColumn": "", "targets": [ { - "expr": "sum(rate(container_cpu_usage_seconds_total{app=\"cadvisor\", cluster_id=\"$cluster\", container!=\"\", namespace=\"$namespace\", pod=~\"$statefulset.*\"}[3m]))", + "expr": "sum(rate(container_cpu_usage_seconds_total{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", container!=\"\", namespace=\"$namespace\", pod=~\"$statefulset.*\"}[3m]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "", @@ -151,7 +151,7 @@ "tableColumn": "", "targets": [ { - "expr": "sum(container_memory_usage_bytes{app=\"cadvisor\", cluster_id=\"$cluster\", container!=\"\", namespace=\"$namespace\", pod=~\"$statefulset.*\"}) / 1024^3", + "expr": "sum(container_memory_usage_bytes{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", container!=\"\", namespace=\"$namespace\", pod=~\"$statefulset.*\"}) / 1024^3", "format": "time_series", "intervalFactor": 2, "legendFormat": "", @@ -230,7 +230,7 @@ "tableColumn": "", "targets": [ { - "expr": "sum(rate(container_network_transmit_bytes_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=~\"$statefulset.*\"}[3m])) + sum(rate(container_network_receive_bytes_total{app=\"cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\",pod=~\"$statefulset.*\"}[3m]))", + "expr": "sum(rate(container_network_transmit_bytes_total{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\", pod=~\"$statefulset.*\"}[3m])) + sum(rate(container_network_receive_bytes_total{metrics_path=\"/metrics/cadvisor\", cluster_id=\"$cluster\", namespace=\"$namespace\",pod=~\"$statefulset.*\"}[3m]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "", @@ -324,7 +324,7 @@ "tableColumn": "", "targets": [ { - "expr": "max(kube_statefulset_replicas{app=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", statefulset=\"$statefulset\"}) without (instance, pod)", + "expr": "max(kube_statefulset_replicas{job=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", statefulset=\"$statefulset\"}) without (instance, pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "", @@ -404,7 +404,7 @@ "tableColumn": "", "targets": [ { - "expr": "min(kube_statefulset_status_replicas_current{app=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", statefulset=\"$statefulset\"}) without (instance, pod)", + "expr": "min(kube_statefulset_status_replicas_current{job=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", statefulset=\"$statefulset\"}) without (instance, pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "", @@ -484,7 +484,7 @@ "tableColumn": "", "targets": [ { - "expr": "max(kube_statefulset_status_observed_generation{app=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", statefulset=\"$statefulset\"}) without (instance, pod)", + "expr": "max(kube_statefulset_status_observed_generation{job=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\", statefulset=\"$statefulset\"}) without (instance, pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "", @@ -564,7 +564,7 @@ "tableColumn": "", "targets": [ { - "expr": "max(kube_statefulset_metadata_generation{app=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster_id=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", + "expr": "max(kube_statefulset_metadata_generation{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster_id=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "", @@ -637,35 +637,35 @@ "steppedLine": false, "targets": [ { - "expr": "max(kube_statefulset_replicas{app=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster_id=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", + "expr": "max(kube_statefulset_replicas{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster_id=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "replicas specified", "refId": "A" }, { - "expr": "max(kube_statefulset_status_replicas{app=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster_id=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", + "expr": "max(kube_statefulset_status_replicas{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster_id=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "replicas created", "refId": "B" }, { - "expr": "min(kube_statefulset_status_replicas_ready{app=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster_id=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", + "expr": "min(kube_statefulset_status_replicas_ready{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster_id=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "ready", "refId": "C" }, { - "expr": "min(kube_statefulset_status_replicas_current{app=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster_id=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", + "expr": "min(kube_statefulset_status_replicas_current{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster_id=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "replicas of current version", "refId": "D" }, { - "expr": "min(kube_statefulset_status_replicas_updated{app=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster_id=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", + "expr": "min(kube_statefulset_status_replicas_updated{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster_id=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", "format": "time_series", "intervalFactor": 2, "legendFormat": "updated", @@ -770,7 +770,7 @@ "multi": false, "name": "namespace", "options": [], - "query": "label_values(kube_statefulset_metadata_generation{app=\"kube-state-metrics\", cluster_id=\"$cluster\"}, namespace)", + "query": "label_values(kube_statefulset_metadata_generation{job=\"kube-state-metrics\", cluster_id=\"$cluster\"}, namespace)", "refresh": 2, "regex": "", "sort": 1, @@ -790,7 +790,7 @@ "multi": false, "name": "statefulset", "options": [], - "query": "label_values(kube_statefulset_metadata_generation{app=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\"}, statefulset)", + "query": "label_values(kube_statefulset_metadata_generation{job=\"kube-state-metrics\", cluster_id=\"$cluster\", namespace=\"$namespace\"}, statefulset)", "refresh": 2, "regex": "", "sort": 1,