From 631af28cc057719203a231eb369b6a792bb9ec7c Mon Sep 17 00:00:00 2001 From: Oleksandr Stepanov Date: Mon, 20 Aug 2018 10:48:59 +0300 Subject: [PATCH] Added namespace label to Container Dasboard --- src/dashboards/k8s-container.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/dashboards/k8s-container.json b/src/dashboards/k8s-container.json index 782640c..39937d6 100644 --- a/src/dashboards/k8s-container.json +++ b/src/dashboards/k8s-container.json @@ -126,7 +126,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(container_memory_usage_bytes{pod_name=~\"$pod\"}) by (pod_name)", + "expr": "sum(container_memory_usage_bytes{pod_name=~\"$pod\",namespace=~\"$namespace\"}) by (pod_name)", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{ pod_name }}", @@ -217,7 +217,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(irate(container_cpu_usage_seconds_total{pod_name=~\"$pod\"}[2m])) by (pod_name)", + "expr": "sum(irate(container_cpu_usage_seconds_total{pod_name=~\"$pod\",namespace=~\"$namespace\"}[2m])) by (pod_name)", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{ pod_name }}", @@ -307,7 +307,7 @@ "steppedLine": false, "targets": [ { - "expr": "rate(container_network_transmit_bytes_total{pod_name=~\"$pod\", kubernetes_io_hostname=~\"$node\"}[2m])", + "expr": "rate(container_network_transmit_bytes_total{pod_name=~\"$pod\",namespace=~\"$namespace\",kubernetes_io_hostname=~\"$node\"}[2m])", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -398,7 +398,7 @@ "steppedLine": false, "targets": [ { - "expr": "rate(container_network_receive_bytes_total{pod_name=~\"$pod\", kubernetes_io_hostname=~\"$node\"}[2m])", + "expr": "rate(container_network_receive_bytes_total{pod_name=~\"$pod\",namespace=~\"$namespace\",kubernetes_io_hostname=~\"$node\"}[2m])", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{ pod_name }}", @@ -489,7 +489,7 @@ "steppedLine": false, "targets": [ { - "expr": "rate(container_fs_io_time_seconds_total{pod_name=~\"$pod\"}[2m])", + "expr": "rate(container_fs_io_time_seconds_total{pod_name=~\"$pod\",namespace=~\"$namespace\"}[2m])", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{pod_name}}", @@ -577,7 +577,7 @@ "steppedLine": false, "targets": [ { - "expr": "rate(container_fs_write_seconds_total{pod_name=~\"$pod\"}[2m])", + "expr": "rate(container_fs_write_seconds_total{pod_name=~\"$pod\",namespace=~\"$namespace\"}[2m])", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{ pod_name }}",