From b1e2f0bcd9e1953281c2db58a36d08c35ee72c55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Otto=20Kr=C3=B6pke?= Date: Wed, 27 Mar 2024 13:19:52 +0100 Subject: [PATCH] feat(k8s-views-global): Windows node support (#103) --- dashboards/k8s-views-global.json | 661 +++++++++++++++++++++++++++---- 1 file changed, 573 insertions(+), 88 deletions(-) diff --git a/dashboards/k8s-views-global.json b/dashboards/k8s-views-global.json index f94e5ed..7f5585d 100644 --- a/dashboards/k8s-views-global.json +++ b/dashboards/k8s-views-global.json @@ -114,8 +114,7 @@ } ] }, - "unit": "percentunit", - "unitScale": true + "unit": "percentunit" }, "overrides": [] }, @@ -144,7 +143,7 @@ "sizing": "auto", "valueMode": "color" }, - "pluginVersion": "10.3.1", + "pluginVersion": "10.4.0", "targets": [ { "datasource": { @@ -155,9 +154,23 @@ "exemplar": true, "expr": "avg(sum by (instance, cpu) (rate(node_cpu_seconds_total{mode!~\"idle|iowait|steal\", cluster=\"$cluster\"}[$__rate_interval])))", "interval": "", - "legendFormat": "Real", + "legendFormat": "Real Linux", "range": true, - "refId": "A" + "refId": "Real Linux" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avg(sum by (core) (rate(windows_cpu_time_total{mode!=\"idle\", cluster=\"$cluster\"}[$__rate_interval])))", + "hide": false, + "interval": "", + "legendFormat": "Real Windows", + "range": true, + "refId": "Real Windows" }, { "datasource": { @@ -169,7 +182,7 @@ "hide": false, "legendFormat": "Requests", "range": true, - "refId": "B" + "refId": "Requests" }, { "datasource": { @@ -181,10 +194,45 @@ "hide": false, "legendFormat": "Limits", "range": true, - "refId": "C" + "refId": "Limits" } ], "title": "Global CPU Usage", + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Real", + "mode": "reduceRow", + "reduce": { + "include": [ + "Real Linux", + "Real Windows" + ], + "reducer": "mean" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Real Linux": true, + "Real Windows": true, + "Time": true + }, + "indexByName": { + "Limits": 5, + "Real": 1, + "Real Linux": 2, + "Real Windows": 3, + "Requests": 4, + "Time": 0 + }, + "renameByName": {} + } + } + ], "type": "bargauge" }, { @@ -214,8 +262,7 @@ } ] }, - "unit": "percentunit", - "unitScale": true + "unit": "percentunit" }, "overrides": [] }, @@ -245,7 +292,7 @@ "text": {}, "valueMode": "color" }, - "pluginVersion": "10.3.1", + "pluginVersion": "10.4.0", "targets": [ { "datasource": { @@ -255,10 +302,24 @@ "editorMode": "code", "exemplar": true, "expr": "sum(node_memory_MemTotal_bytes{cluster=\"$cluster\"} - node_memory_MemAvailable_bytes{cluster=\"$cluster\"}) / sum(node_memory_MemTotal_bytes{cluster=\"$cluster\"})", + "hide": false, "interval": "", - "legendFormat": "Real", + "legendFormat": "Real Linux", "range": true, - "refId": "A" + "refId": "Real Linux" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(windows_memory_available_bytes{cluster=\"$cluster\"} + windows_memory_cache_bytes{cluster=\"$cluster\"}) / sum(windows_os_visible_memory_bytes{cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "Real Windows", + "range": true, + "refId": "Real Windows" }, { "datasource": { @@ -270,7 +331,7 @@ "hide": false, "legendFormat": "Requests", "range": true, - "refId": "B" + "refId": "Requests" }, { "datasource": { @@ -282,10 +343,46 @@ "hide": false, "legendFormat": "Limits", "range": true, - "refId": "C" + "refId": "Limits" } ], "title": "Global RAM Usage", + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Real", + "mode": "reduceRow", + "reduce": { + "include": [ + "Real Linux", + "Real Windows" + ], + "reducer": "mean" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Real Linux": true, + "Real Windows": true, + "Time": true + }, + "includeByName": {}, + "indexByName": { + "Limits": 5, + "Real": 3, + "Real Linux": 1, + "Real Windows": 2, + "Requests": 4, + "Time": 0 + }, + "renameByName": {} + } + } + ], "type": "bargauge" }, { @@ -305,8 +402,7 @@ "value": null } ] - }, - "unitScale": true + } }, "overrides": [] }, @@ -334,17 +430,19 @@ "textMode": "value", "wideLayout": true }, - "pluginVersion": "10.3.1", + "pluginVersion": "10.4.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "${datasource}" }, + "editorMode": "code", "exemplar": true, "expr": "count(count by (node) (kube_node_info{cluster=\"$cluster\"}))", "interval": "", "legendFormat": "", + "range": true, "refId": "A" } ], @@ -407,8 +505,7 @@ } ] }, - "unit": "short", - "unitScale": true + "unit": "short" }, "overrides": [] }, @@ -613,8 +710,7 @@ "value": null } ] - }, - "unitScale": true + } }, "overrides": [] }, @@ -642,7 +738,7 @@ "textMode": "value", "wideLayout": true }, - "pluginVersion": "10.3.1", + "pluginVersion": "10.4.0", "targets": [ { "datasource": { @@ -676,8 +772,7 @@ } ] }, - "unit": "none", - "unitScale": true + "unit": "none" }, "overrides": [] }, @@ -705,7 +800,7 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "10.3.1", + "pluginVersion": "10.4.0", "targets": [ { "datasource": { @@ -716,9 +811,23 @@ "exemplar": true, "expr": "sum(rate(node_cpu_seconds_total{mode!~\"idle|iowait|steal\", cluster=\"$cluster\"}[$__rate_interval]))", "interval": "", - "legendFormat": "Real", + "legendFormat": "Real Linux", "range": true, - "refId": "A" + "refId": "Real Linux" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(windows_cpu_time_total{mode!=\"idle\", cluster=\"$cluster\"}[$__rate_interval]))", + "hide": false, + "interval": "", + "legendFormat": "Real Windows", + "range": true, + "refId": "Real Windows" }, { "datasource": { @@ -730,7 +839,7 @@ "hide": false, "legendFormat": "Requests", "range": true, - "refId": "B" + "refId": "Requests" }, { "datasource": { @@ -742,7 +851,7 @@ "hide": false, "legendFormat": "Limits", "range": true, - "refId": "C" + "refId": "Limits" }, { "datasource": { @@ -754,10 +863,50 @@ "hide": false, "legendFormat": "Total", "range": true, - "refId": "D" + "refId": "Total" } ], "title": "CPU Usage", + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Real", + "mode": "reduceRow", + "reduce": { + "include": [ + "Real Linux", + "Real Windows" + ], + "reducer": "sum" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Real Linux": true, + "Real Windows": true, + "Time": true, + "Total Linux": true, + "Total Windows": true + }, + "indexByName": { + "Limits": 5, + "Real": 3, + "Real Linux": 1, + "Real Windows": 2, + "Requests": 4, + "Time": 0, + "Total": 8, + "Total Linux": 6, + "Total Windows": 7 + }, + "renameByName": {} + } + } + ], "type": "stat" }, { @@ -778,8 +927,7 @@ } ] }, - "unit": "bytes", - "unitScale": true + "unit": "bytes" }, "overrides": [] }, @@ -807,7 +955,7 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "10.3.1", + "pluginVersion": "10.4.0", "targets": [ { "datasource": { @@ -818,9 +966,23 @@ "exemplar": true, "expr": "sum(node_memory_MemTotal_bytes{cluster=\"$cluster\"} - node_memory_MemAvailable_bytes{cluster=\"$cluster\"})", "interval": "", - "legendFormat": "Real", + "legendFormat": "Real Linux", "range": true, - "refId": "A" + "refId": "Real Linux" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(windows_os_visible_memory_bytes{cluster=\"$cluster\"} - windows_memory_available_bytes{cluster=\"$cluster\"} - windows_memory_cache_bytes{cluster=\"$cluster\"})", + "hide": false, + "interval": "", + "legendFormat": "Real Windows", + "range": true, + "refId": "Real Windows" }, { "datasource": { @@ -832,7 +994,7 @@ "hide": false, "legendFormat": "Requests", "range": true, - "refId": "B" + "refId": "Requests" }, { "datasource": { @@ -844,7 +1006,7 @@ "hide": false, "legendFormat": "Limits", "range": true, - "refId": "C" + "refId": "Limits" }, { "datasource": { @@ -856,10 +1018,47 @@ "hide": false, "legendFormat": "Total", "range": true, - "refId": "D" + "refId": "Total" } ], "title": "RAM Usage", + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Real", + "mode": "reduceRow", + "reduce": { + "include": [ + "Real Linux", + "Real Windows" + ], + "reducer": "mean" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Real Linux": true, + "Real Windows": true, + "Time": true + }, + "includeByName": {}, + "indexByName": { + "Limits": 5, + "Real": 3, + "Real Linux": 1, + "Real Windows": 2, + "Requests": 4, + "Time": 0, + "Total": 6 + }, + "renameByName": {} + } + } + ], "type": "stat" }, { @@ -879,8 +1078,7 @@ "value": null } ] - }, - "unitScale": true + } }, "overrides": [] }, @@ -908,7 +1106,7 @@ "textMode": "value", "wideLayout": true }, - "pluginVersion": "10.3.1", + "pluginVersion": "10.4.0", "targets": [ { "datasource": { @@ -1006,8 +1204,7 @@ } ] }, - "unit": "percentunit", - "unitScale": true + "unit": "percentunit" }, "overrides": [] }, @@ -1037,14 +1234,43 @@ "type": "prometheus", "uid": "${datasource}" }, + "editorMode": "code", "exemplar": true, "expr": "avg(sum by (instance, cpu) (rate(node_cpu_seconds_total{mode!~\"idle|iowait|steal\", cluster=\"$cluster\"}[$__rate_interval])))", "interval": "$resolution", - "legendFormat": "CPU usage in %", - "refId": "A" + "legendFormat": "Linux", + "range": true, + "refId": "Linux" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "1 - avg(rate(windows_cpu_time_total{cluster=\"$cluster\",mode=\"idle\"}[$__rate_interval]))", + "hide": false, + "interval": "$resolution", + "legendFormat": "Windows", + "range": true, + "refId": "Windows" } ], "title": "Cluster CPU Utilization", + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "CPU usage in %", + "mode": "reduceRow", + "reduce": { + "reducer": "mean" + }, + "replaceFields": true + } + } + ], "type": "timeseries" }, { @@ -1107,8 +1333,7 @@ } ] }, - "unit": "percentunit", - "unitScale": true + "unit": "percentunit" }, "overrides": [] }, @@ -1147,12 +1372,39 @@ "exemplar": true, "expr": "sum(node_memory_MemTotal_bytes{cluster=\"$cluster\"} - node_memory_MemAvailable_bytes{cluster=\"$cluster\"}) / sum(node_memory_MemTotal_bytes{cluster=\"$cluster\"})", "interval": "$resolution", - "legendFormat": "Memory usage in %", + "legendFormat": "Linux", "range": true, - "refId": "A" + "refId": "Linux" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(windows_os_visible_memory_bytes{cluster=\"$cluster\"} - windows_memory_available_bytes{cluster=\"$cluster\"}) / sum(windows_os_visible_memory_bytes{cluster=\"$cluster\"})", + "hide": false, + "interval": "$resolution", + "legendFormat": "Windows", + "range": true, + "refId": "Windows" } ], "title": "Cluster Memory Utilization", + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Memory usage in %", + "mode": "reduceRow", + "reduce": { + "reducer": "mean" + }, + "replaceFields": true + } + } + ], "type": "timeseries" }, { @@ -1215,8 +1467,7 @@ } ] }, - "unit": "none", - "unitScale": true + "unit": "none" }, "overrides": [] }, @@ -1245,17 +1496,21 @@ "sort": "none" } }, - "pluginVersion": "8.3.3", + "pluginVersion": "10.4.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "${datasource}" }, + "editorMode": "code", "exemplar": true, - "expr": "sum(rate(container_cpu_usage_seconds_total{image!=\"\", cluster=\"$cluster\"}[$__rate_interval])) by (namespace)", + "expr": "sum(rate(container_cpu_usage_seconds_total{image!=\"\", cluster=\"$cluster\"}[$__rate_interval])) by (namespace)\n+ on (namespace)\n(sum(rate(windows_container_cpu_usage_seconds_total{container_id!=\"\", cluster=\"$cluster\"}[$__rate_interval]) * on (container_id) group_left (container, pod, namespace) max by ( container, container_id, pod, namespace) (kube_pod_container_info{container_id!=\"\", cluster=\"$cluster\"}) OR kube_namespace_created{cluster=\"$cluster\"} * 0) by (namespace))", + "format": "time_series", + "hide": false, "interval": "$resolution", "legendFormat": "{{ namespace }}", + "range": true, "refId": "A" } ], @@ -1318,8 +1573,7 @@ } ] }, - "unit": "bytes", - "unitScale": true + "unit": "bytes" }, "overrides": [] }, @@ -1355,10 +1609,12 @@ "type": "prometheus", "uid": "${datasource}" }, + "editorMode": "code", "exemplar": true, - "expr": "sum(container_memory_working_set_bytes{image!=\"\", cluster=\"$cluster\"}) by (namespace)", + "expr": "sum(container_memory_working_set_bytes{image!=\"\", cluster=\"$cluster\"}) by (namespace)\n+ on (namespace)\n(sum(windows_container_memory_usage_commit_bytes{container_id!=\"\", cluster=\"$cluster\"} * on (container_id) group_left (container, pod, namespace) max by ( container, container_id, pod, namespace) (kube_pod_container_info{container_id!=\"\", cluster=\"$cluster\"}) OR kube_namespace_created{cluster=\"$cluster\"} * 0) by (namespace))", "interval": "$resolution", "legendFormat": "{{ namespace }}", + "range": true, "refId": "A" } ], @@ -1376,6 +1632,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "CPU %", @@ -1389,6 +1646,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 2, "pointSize": 5, @@ -1411,7 +1669,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -1455,11 +1714,27 @@ "type": "prometheus", "uid": "${datasource}" }, + "editorMode": "code", "exemplar": true, "expr": "avg(sum by (instance, cpu) (rate(node_cpu_seconds_total{mode!~\"idle|iowait|steal\", cluster=\"$cluster\"}[$__rate_interval]))) by (instance)", "interval": "$resolution", "legendFormat": "{{ node }}", - "refId": "A" + "range": true, + "refId": "Linux" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avg(sum by (instance,core) (rate(windows_cpu_time_total{mode!=\"idle\", cluster=\"$cluster\"}[$__rate_interval]))) by (instance)", + "hide": false, + "interval": "$resolution", + "legendFormat": "{{ node }}", + "range": true, + "refId": "Windows" } ], "title": "CPU Utilization by instance", @@ -1476,6 +1751,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "MEMORY", @@ -1489,6 +1765,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 2, "pointSize": 5, @@ -1510,7 +1787,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -1557,10 +1835,25 @@ "editorMode": "code", "exemplar": true, "expr": "sum(node_memory_MemTotal_bytes{cluster=\"$cluster\"} - node_memory_MemAvailable_bytes{cluster=\"$cluster\"}) by (instance)", + "hide": false, "interval": "$resolution", - "legendFormat": "{{ node}}", + "legendFormat": "{{ instance }}", "range": true, - "refId": "A" + "refId": "Linux" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(windows_os_visible_memory_bytes{cluster=\"$cluster\"} - windows_memory_available_bytes{cluster=\"$cluster\"}) by (instance)", + "hide": false, + "interval": "$resolution", + "legendFormat": "{{ instance }}", + "range": true, + "refId": "Windows" } ], "title": "Memory Utilization by instance", @@ -1578,6 +1871,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "SECONDS", @@ -1591,6 +1885,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineStyle": { "fill": "solid" @@ -1616,7 +1911,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -1684,6 +1980,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "NB", @@ -1697,6 +1994,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineStyle": { "fill": "solid" @@ -1722,7 +2020,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -1802,6 +2101,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", @@ -1815,6 +2115,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 2, "pointSize": 5, @@ -1836,7 +2137,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -1915,6 +2217,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", @@ -1928,6 +2231,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 2, "pointSize": 5, @@ -1949,7 +2253,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -2017,6 +2322,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", @@ -2030,6 +2336,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 2, "pointSize": 5, @@ -2051,7 +2358,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -2119,6 +2427,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", @@ -2132,6 +2441,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 2, "pointSize": 5, @@ -2153,7 +2463,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -2238,6 +2549,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "BANDWIDTH", @@ -2251,6 +2563,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 2, "pointSize": 5, @@ -2272,7 +2585,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -2312,11 +2626,11 @@ }, "editorMode": "code", "exemplar": true, - "expr": "sum(rate(node_network_receive_bytes_total{device!~\"lxc.*|veth.*\", cluster=\"$cluster\"}[$__rate_interval])) by (device)", + "expr": "sum(rate(node_network_receive_bytes_total{device!~\"(veth|azv|lxc).*\", cluster=\"$cluster\"}[$__rate_interval])) by (device)", "interval": "$resolution", "legendFormat": "Received : {{ device }}", "range": true, - "refId": "A" + "refId": "Linux Received" }, { "datasource": { @@ -2325,11 +2639,39 @@ }, "editorMode": "code", "exemplar": true, - "expr": "- sum(rate(node_network_transmit_bytes_total{device!~\"lxc.*|veth.*\", cluster=\"$cluster\"}[$__rate_interval])) by (device)", + "expr": "- sum(rate(node_network_transmit_bytes_total{device!~\"(veth|azv|lxc).*\", cluster=\"$cluster\"}[$__rate_interval])) by (device)", "interval": "$resolution", "legendFormat": "Transmitted : {{ device }}", "range": true, - "refId": "B" + "refId": "Linux Transmitted" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(windows_net_bytes_received_total{cluster=\"$cluster\"}[$__rate_interval])) by (nic)", + "hide": false, + "interval": "$resolution", + "legendFormat": "Received : {{ nic }}", + "range": true, + "refId": "Windows Received" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "- sum(rate(windows_net_bytes_sent_total{cluster=\"$cluster\"}[$__rate_interval])) by (nic)", + "hide": false, + "interval": "$resolution", + "legendFormat": "Transmitted : {{ device }}", + "range": true, + "refId": "Windows Transmitted" } ], "title": "Global Network Utilization by device", @@ -2346,6 +2688,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "DROPPED PACKETS", @@ -2359,6 +2702,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 2, "pointSize": 5, @@ -2380,7 +2724,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -2422,9 +2767,9 @@ "exemplar": true, "expr": "sum(rate(node_network_receive_drop_total{cluster=\"$cluster\"}[$__rate_interval]))", "interval": "$resolution", - "legendFormat": "Packets dropped (receive)", + "legendFormat": "Linux Packets dropped (receive)", "range": true, - "refId": "A" + "refId": "Linux Packets dropped (receive)" }, { "datasource": { @@ -2435,12 +2780,85 @@ "exemplar": true, "expr": "- sum(rate(node_network_transmit_drop_total{cluster=\"$cluster\"}[$__rate_interval]))", "interval": "$resolution", - "legendFormat": "Packets dropped (transmit)", + "legendFormat": "Linux Packets dropped (transmit)", "range": true, - "refId": "B" + "refId": "Linux Packets dropped (transmit)" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(windows_net_packets_received_discarded_total{cluster=\"$cluster\"}[$__rate_interval]))", + "hide": false, + "interval": "$resolution", + "legendFormat": "Windows Packets dropped (receive)", + "range": true, + "refId": "Windows Packets dropped (receive)" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "- sum(rate(windows_net_packets_outbound_discarded_total{cluster=\"$cluster\"}[$__rate_interval]))", + "hide": false, + "interval": "$resolution", + "legendFormat": "Windows Packets dropped (transmit)", + "range": true, + "refId": "Windows Packets dropped (transmit)" } ], "title": "Network Saturation - Packets dropped", + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Packets dropped (receive)", + "mode": "reduceRow", + "reduce": { + "include": [ + "Linux Packets dropped (receive)", + "Windows Packets dropped (receive)" + ], + "reducer": "mean" + } + } + }, + { + "id": "calculateField", + "options": { + "alias": "Packets dropped (transmit)", + "mode": "reduceRow", + "reduce": { + "include": [ + "Linux Packets dropped (transmit)", + "Windows Packets dropped (transmit)" + ], + "reducer": "mean" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Linux Packets dropped (receive)": true, + "Linux Packets dropped (transmit)": true, + "Time": false, + "Windows Packets dropped (receive)": true, + "Windows Packets dropped (transmit)": true + }, + "includeByName": {}, + "indexByName": {}, + "renameByName": {} + } + } + ], "type": "timeseries" }, { @@ -2454,6 +2872,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "BANDWIDTH", @@ -2467,6 +2886,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 2, "pointSize": 5, @@ -2488,7 +2908,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -2528,7 +2949,7 @@ }, "editorMode": "code", "exemplar": true, - "expr": "sum(rate(container_network_receive_bytes_total{cluster=\"$cluster\"}[$__rate_interval])) by (namespace)", + "expr": "sum(rate(container_network_receive_bytes_total{cluster=\"$cluster\"}[$__rate_interval])) by (namespace)\n+ on (namespace)\n(sum(rate(windows_container_network_receive_bytes_total{container_id!=\"\", cluster=\"$cluster\"}[$__rate_interval]) * on (container_id) group_left (container, pod, namespace) max by ( container, container_id, pod, namespace) (kube_pod_container_info{container_id!=\"\", cluster=\"$cluster\"}) OR kube_namespace_created{cluster=\"$cluster\"} * 0) by (namespace))", "interval": "$resolution", "legendFormat": "Received : {{ namespace }}", "range": true, @@ -2540,7 +2961,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "- sum(rate(container_network_transmit_bytes_total{cluster=\"$cluster\"}[$__rate_interval])) by (namespace)", + "expr": "- (sum(rate(container_network_transmit_bytes_total{cluster=\"$cluster\"}[$__rate_interval])) by (namespace)\n+ on (namespace)\n(sum(rate(windows_container_network_transmit_bytes_total{container_id!=\"\", cluster=\"$cluster\"}[$__rate_interval]) * on (container_id) group_left (container, pod, namespace) max by ( container, container_id, pod, namespace) (kube_pod_container_info{container_id!=\"\", cluster=\"$cluster\"}) OR kube_namespace_created{cluster=\"$cluster\"} * 0) by (namespace)))", "hide": false, "interval": "$resolution", "legendFormat": "Transmitted : {{ namespace }}", @@ -2562,6 +2983,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "BANDWIDTH", @@ -2575,6 +2997,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 2, "pointSize": 5, @@ -2596,7 +3019,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -2640,7 +3064,7 @@ "interval": "$resolution", "legendFormat": "Received bytes in {{ instance }}", "range": true, - "refId": "A" + "refId": "Linux Received bytes" }, { "datasource": { @@ -2653,7 +3077,34 @@ "interval": "$resolution", "legendFormat": "Transmitted bytes in {{ instance }}", "range": true, - "refId": "B" + "refId": "Linux Transmitted bytes" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(windows_net_bytes_received_total{cluster=\"$cluster\"}[$__rate_interval])) by (instance)", + "hide": false, + "interval": "$resolution", + "legendFormat": "Received bytes in {{ instance }}", + "range": true, + "refId": "Windows Received bytes" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "- sum(rate(windows_net_bytes_sent_total{cluster=\"$cluster\"}[$__rate_interval])) by (instance)", + "hide": false, + "interval": "$resolution", + "legendFormat": "Transmitted bytes in {{ instance }}", + "range": true, + "refId": "Windows Transmitted bytes" } ], "title": "Total Network Received (with all virtual devices) by instance", @@ -2671,6 +3122,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "BANDWIDTH", @@ -2684,6 +3136,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 2, "pointSize": 5, @@ -2705,7 +3158,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -2745,7 +3199,7 @@ }, "editorMode": "code", "exemplar": true, - "expr": "sum(rate(node_network_receive_bytes_total{device!~\"lxc.*|veth.*|lo\", cluster=\"$cluster\"}[$__rate_interval])) by (instance)", + "expr": "sum(rate(node_network_receive_bytes_total{device!~\"(veth|azv|lxc|lo).*\", cluster=\"$cluster\"}[$__rate_interval])) by (instance)", "interval": "$resolution", "legendFormat": "Received bytes in {{ instance }}", "range": true, @@ -2757,12 +3211,40 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "- sum(rate(node_network_transmit_bytes_total{device!~\"lxc.*|veth.*|lo\", cluster=\"$cluster\"}[$__rate_interval])) by (instance)", + "expr": "- sum(rate(node_network_transmit_bytes_total{device!~\"(veth|azv|lxc|lo).*\", cluster=\"$cluster\"}[$__rate_interval])) by (instance)", "hide": false, "interval": "$resolution", "legendFormat": "Transmitted bytes in {{ instance }}", "range": true, "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(windows_net_bytes_received_total{nic!~\".*Virtual.*\",cluster=\"$cluster\"}[$__rate_interval])) by (instance)", + "hide": false, + "interval": "$resolution", + "legendFormat": "Received bytes in {{ instance }}", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "- sum(rate(windows_net_bytes_sent_total{nic!~\".*Virtual.*\",cluster=\"$cluster\"}[$__rate_interval])) by (instance)", + "hide": false, + "interval": "$resolution", + "legendFormat": "Transmitted bytes in {{ instance }}", + "range": true, + "refId": "D" } ], "title": "Network Received (without loopback) by instance", @@ -2780,6 +3262,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "BANDWIDTH", @@ -2793,6 +3276,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 2, "pointSize": 5, @@ -2814,7 +3298,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -2984,6 +3469,6 @@ "timezone": "", "title": "Kubernetes / Views / Global", "uid": "k8s_views_global", - "version": 37, + "version": 38, "weekStart": "" }