diff --git a/dashboards/k8s-views-namespaces.json b/dashboards/k8s-views-namespaces.json index 4802487..6878e73 100644 --- a/dashboards/k8s-views-namespaces.json +++ b/dashboards/k8s-views-namespaces.json @@ -134,7 +134,7 @@ "showThresholdMarkers": true, "text": {} }, - "pluginVersion": "9.5.1", + "pluginVersion": "10.0.3", "targets": [ { "datasource": { @@ -206,7 +206,7 @@ "showThresholdMarkers": true, "text": {} }, - "pluginVersion": "9.5.1", + "pluginVersion": "10.0.3", "targets": [ { "datasource": { @@ -466,7 +466,7 @@ "text": {}, "textMode": "auto" }, - "pluginVersion": "9.5.1", + "pluginVersion": "10.0.3", "targets": [ { "datasource": { @@ -565,7 +565,7 @@ "text": {}, "textMode": "auto" }, - "pluginVersion": "9.5.1", + "pluginVersion": "10.0.3", "targets": [ { "datasource": { @@ -620,6 +620,23 @@ "title": "Namespace(s) RAM Usage in bytes", "type": "stat" }, + { + "collapsed": false, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 40, + "panels": [], + "title": "Resources", + "type": "row" + }, { "datasource": { "type": "prometheus", @@ -633,7 +650,7 @@ "custom": { "axisCenteredZero": false, "axisColorMode": "text", - "axisLabel": "", + "axisLabel": "CPU CORES", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", @@ -674,32 +691,26 @@ } ] }, - "unit": "short" + "unit": "none" }, "overrides": [] }, "gridPos": { - "h": 9, + "h": 8, "w": 12, "x": 0, - "y": 12 + "y": 13 }, - "id": 70, + "id": 29, "options": { "legend": { - "calcs": [ - "min", - "max", - "mean" - ], + "calcs": [], "displayMode": "table", "placement": "right", - "showLegend": true, - "sortBy": "Max", - "sortDesc": true + "showLegend": true }, "tooltip": { - "mode": "multi", + "mode": "single", "sort": "none" } }, @@ -712,26 +723,110 @@ }, "editorMode": "code", "exemplar": true, - "expr": "sum(kube_pod_status_qos_class{namespace=~\"$namespace\"}) by (qos_class)", - "interval": "", - "legendFormat": "{{ qos_class }} pods", + "expr": "sum(rate(container_cpu_usage_seconds_total{namespace=~\"$namespace\", image!=\"\", pod=~\"${created_by}.*\"}[$__rate_interval])) by (pod)", + "interval": "$resolution", + "legendFormat": "{{ pod }}", "range": true, "refId": "A" + } + ], + "title": "CPU usage by Pod", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 13 + }, + "id": 30, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ { "datasource": { "type": "prometheus", "uid": "${datasource}" }, "editorMode": "code", - "expr": "sum(kube_pod_info{namespace=~\"$namespace\"})", - "hide": false, - "legendFormat": "Total pods", + "exemplar": true, + "expr": "sum(container_memory_working_set_bytes{namespace=~\"$namespace\", image!=\"\", pod=~\"${created_by}.*\"}) by (pod)", + "interval": "$resolution", + "legendFormat": "{{ pod }}", "range": true, - "refId": "B" + "refId": "A" } ], - "title": "Kubernetes Pods QoS classes", + "title": "Memory usage by Pod", "type": "timeseries" }, { @@ -739,6 +834,7 @@ "type": "prometheus", "uid": "${datasource}" }, + "description": "", "fieldConfig": { "defaults": { "color": { @@ -747,7 +843,7 @@ "custom": { "axisCenteredZero": false, "axisColorMode": "text", - "axisLabel": "", + "axisLabel": "SECONDS", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", @@ -759,6 +855,9 @@ "viz": false }, "lineInterpolation": "smooth", + "lineStyle": { + "fill": "solid" + }, "lineWidth": 2, "pointSize": 5, "scaleDistribution": { @@ -774,6 +873,7 @@ "mode": "off" } }, + "decimals": 2, "mappings": [], "thresholds": { "mode": "absolute", @@ -788,17 +888,17 @@ } ] }, - "unit": "short" + "unit": "s" }, "overrides": [] }, "gridPos": { - "h": 9, + "h": 8, "w": 12, - "x": 12, - "y": 12 + "x": 0, + "y": 21 }, - "id": 72, + "id": 68, "options": { "legend": { "calcs": [ @@ -826,31 +926,27 @@ }, "editorMode": "code", "exemplar": true, - "expr": "sum(kube_pod_status_reason) by (reason)", - "interval": "", - "legendFormat": "{{ reason }}", + "expr": "sum(rate(container_cpu_cfs_throttled_seconds_total{namespace=~\"$namespace\", image!=\"\", pod=~\"${created_by}.*\"}[$__rate_interval])) by (pod) > 0", + "interval": "$resolution", + "legendFormat": "{{ pod }}", "range": true, "refId": "A" } ], - "title": "Kubernetes Pods Status Reason", + "title": "CPU Throttled seconds by pod", "type": "timeseries" }, { "collapsed": false, - "datasource": { - "type": "datasource", - "uid": "grafana" - }, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 21 + "y": 29 }, - "id": 40, + "id": 73, "panels": [], - "title": "Resources", + "title": "Kubernetes", "type": "row" }, { @@ -866,7 +962,7 @@ "custom": { "axisCenteredZero": false, "axisColorMode": "text", - "axisLabel": "CPU CORES", + "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", @@ -907,26 +1003,32 @@ } ] }, - "unit": "none" + "unit": "short" }, "overrides": [] }, "gridPos": { - "h": 8, + "h": 9, "w": 12, "x": 0, - "y": 22 + "y": 30 }, - "id": 29, + "id": 70, "options": { "legend": { - "calcs": [], + "calcs": [ + "min", + "max", + "mean" + ], "displayMode": "table", "placement": "right", - "showLegend": true + "showLegend": true, + "sortBy": "Max", + "sortDesc": true }, "tooltip": { - "mode": "single", + "mode": "multi", "sort": "none" } }, @@ -939,14 +1041,26 @@ }, "editorMode": "code", "exemplar": true, - "expr": "sum(rate(container_cpu_usage_seconds_total{namespace=~\"$namespace\", image!=\"\", pod=~\"${created_by}.*\"}[$__rate_interval])) by (pod)", - "interval": "$resolution", - "legendFormat": "{{ pod }}", + "expr": "sum(kube_pod_status_qos_class{namespace=~\"$namespace\"}) by (qos_class)", + "interval": "", + "legendFormat": "{{ qos_class }} pods", "range": true, "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_pod_info{namespace=~\"$namespace\"})", + "hide": false, + "legendFormat": "Total pods", + "range": true, + "refId": "B" } ], - "title": "CPU usage by Pod", + "title": "Kubernetes Pods QoS classes", "type": "timeseries" }, { @@ -1003,26 +1117,32 @@ } ] }, - "unit": "bytes" + "unit": "short" }, "overrides": [] }, "gridPos": { - "h": 8, + "h": 9, "w": 12, "x": 12, - "y": 22 + "y": 30 }, - "id": 30, + "id": 72, "options": { "legend": { - "calcs": [], + "calcs": [ + "min", + "max", + "mean" + ], "displayMode": "table", "placement": "right", - "showLegend": true + "showLegend": true, + "sortBy": "Max", + "sortDesc": true }, "tooltip": { - "mode": "single", + "mode": "multi", "sort": "none" } }, @@ -1035,14 +1155,14 @@ }, "editorMode": "code", "exemplar": true, - "expr": "sum(container_memory_working_set_bytes{namespace=~\"$namespace\", image!=\"\", pod=~\"${created_by}.*\"}) by (pod)", - "interval": "$resolution", - "legendFormat": "{{ pod }}", + "expr": "sum(kube_pod_status_reason) by (reason)", + "interval": "", + "legendFormat": "{{ reason }}", "range": true, "refId": "A" } ], - "title": "Memory usage by Pod", + "title": "Kubernetes Pods Status Reason", "type": "timeseries" }, { @@ -1050,7 +1170,7 @@ "type": "prometheus", "uid": "${datasource}" }, - "description": "", + "description": "No data is generally a good thing here.", "fieldConfig": { "defaults": { "color": { @@ -1059,10 +1179,10 @@ "custom": { "axisCenteredZero": false, "axisColorMode": "text", - "axisLabel": "SECONDS", + "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, - "drawStyle": "line", + "drawStyle": "points", "fillOpacity": 25, "gradientMode": "opacity", "hideFrom": { @@ -1071,9 +1191,6 @@ "viz": false }, "lineInterpolation": "smooth", - "lineStyle": { - "fill": "solid" - }, "lineWidth": 2, "pointSize": 5, "scaleDistribution": { @@ -1089,7 +1206,6 @@ "mode": "off" } }, - "decimals": 2, "mappings": [], "thresholds": { "mode": "absolute", @@ -1104,17 +1220,17 @@ } ] }, - "unit": "s" + "unit": "short" }, "overrides": [] }, "gridPos": { - "h": 8, + "h": 9, "w": 12, "x": 0, - "y": 30 + "y": 39 }, - "id": 68, + "id": 74, "options": { "legend": { "calcs": [ @@ -1142,32 +1258,118 @@ }, "editorMode": "code", "exemplar": true, - "expr": "sum(rate(container_cpu_cfs_throttled_seconds_total{namespace=~\"$namespace\", image!=\"\", pod=~\"${created_by}.*\"}[$__rate_interval])) by (pod) > 0", - "interval": "$resolution", - "legendFormat": "{{ pod }}", + "expr": "sum(increase(container_oom_events_total{namespace=~\"${namespace}\"}[$__rate_interval])) by (namespace, pod) > 0", + "interval": "", + "legendFormat": "namespace: {{ namespace }} - pod: {{ pod }}", "range": true, "refId": "A" } ], - "title": "CPU Throttled seconds by pod", + "title": "OOM Events by namespace, pod", "type": "timeseries" }, { - "collapsed": false, "datasource": { - "type": "datasource", - "uid": "grafana" + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "No data is generally a good thing here.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "points", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] }, "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 38 + "h": 9, + "w": 12, + "x": 12, + "y": 39 }, - "id": 44, - "panels": [], - "title": "Kubernetes Resources", - "type": "row" + "id": 75, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Max", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(increase(kube_pod_container_status_restarts_total{namespace=~\"${namespace}\"}[$__rate_interval])) by (namespace, pod) > 0", + "interval": "", + "legendFormat": "namespace: {{ namespace }} - pod: {{ pod }}", + "range": true, + "refId": "A" + } + ], + "title": "Container Restarts by namespace, pod", + "type": "timeseries" }, { "datasource": { @@ -1232,15 +1434,15 @@ "h": 8, "w": 12, "x": 0, - "y": 39 + "y": 48 }, "id": 5, "options": { "legend": { "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false + "displayMode": "table", + "placement": "right", + "showLegend": true }, "tooltip": { "mode": "multi", @@ -1370,7 +1572,7 @@ "h": 8, "w": 12, "x": 12, - "y": 39 + "y": 48 }, "id": 2, "options": { @@ -1465,7 +1667,7 @@ "h": 8, "w": 12, "x": 0, - "y": 47 + "y": 56 }, "id": 7, "options": { @@ -1561,7 +1763,7 @@ "h": 8, "w": 12, "x": 12, - "y": 47 + "y": 56 }, "id": 8, "options": { @@ -1604,7 +1806,7 @@ "h": 1, "w": 24, "x": 0, - "y": 55 + "y": 64 }, "id": 42, "panels": [], @@ -1674,7 +1876,7 @@ "h": 8, "w": 12, "x": 0, - "y": 56 + "y": 65 }, "id": 65, "options": { @@ -1769,7 +1971,7 @@ "h": 8, "w": 12, "x": 12, - "y": 56 + "y": 65 }, "id": 66, "options": { @@ -1876,7 +2078,7 @@ "h": 8, "w": 12, "x": 0, - "y": 64 + "y": 73 }, "id": 27, "options": { @@ -2018,7 +2220,7 @@ }, { "current": { - "selected": true, + "selected": false, "text": "All", "value": "$__all" }, @@ -2053,6 +2255,6 @@ "timezone": "", "title": "Kubernetes / Views / Namespaces", "uid": "k8s_views_ns", - "version": 25, + "version": 26, "weekStart": "" }