From 6c07ab20fcdd2e064d0108458626522a344cab47 Mon Sep 17 00:00:00 2001 From: David Calvert Date: Mon, 4 Nov 2024 20:56:39 +0100 Subject: [PATCH] feat: added pods with unexpected status panel Signed-off-by: David Calvert --- dashboards/k8s-views-namespaces.json | 104 ++++++++++++++++++++++++++- 1 file changed, 102 insertions(+), 2 deletions(-) diff --git a/dashboards/k8s-views-namespaces.json b/dashboards/k8s-views-namespaces.json index 8c29c0b..d5668ec 100644 --- a/dashboards/k8s-views-namespaces.json +++ b/dashboards/k8s-views-namespaces.json @@ -1850,6 +1850,106 @@ "title": "Replicas unavailable by deployment", "type": "timeseries" }, + { + "datasource": { + "default": false, + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "List of pods that are not in Running or Succeeded status.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": 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": 8, + "w": 12, + "x": 0, + "y": 64 + }, + "id": 83, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_pod_status_phase{phase!~\"Running|Succeeded\", namespace=~\"$namespace\", cluster=\"$cluster\"}) by (pod) > 0", + "interval": "", + "legendFormat": "{{ deployment }}", + "range": true, + "refId": "A" + } + ], + "title": "Pods with unexpected status", + "type": "timeseries" + }, { "datasource": { "default": false, @@ -1915,7 +2015,7 @@ "gridPos": { "h": 8, "w": 12, - "x": 0, + "x": 12, "y": 64 }, "id": 82, @@ -2892,6 +2992,6 @@ "timezone": "", "title": "Kubernetes / Views / Namespaces", "uid": "k8s_views_ns", - "version": 39, + "version": 40, "weekStart": "" }