diff --git a/dashboards/k8s-views-pods.json b/dashboards/k8s-views-pods.json index d4f1a96..c5d3a37 100644 --- a/dashboards/k8s-views-pods.json +++ b/dashboards/k8s-views-pods.json @@ -2093,6 +2093,337 @@ "title": "Container Restarts by container", "type": "timeseries" }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto", + "wrapText": false + }, + "filterable": true, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 1 + }, + { + "color": "red", + "value": 5 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "reason" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "mappings", + "value": [ + { + "options": { + "CrashLoopBackOff": { + "color": "light-red", + "index": 0, + "text": "CrashLoopBackOff" + }, + "ErrImagePull": { + "color": "light-orange", + "index": 1, + "text": "ErrImagePull" + }, + "ImagePullBackOff": { + "color": "light-orange", + "index": 2, + "text": "ImagePullBackOff" + } + }, + "type": "value" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 47 + }, + "id": 63, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "11.3.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "kube_pod_container_status_waiting_reason{reason=~\"ErrImagePull|ImagePullBackOff|CrashLoopBackOff\"} == 1", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "Pods with Container Issues", + "transformations": [ + { + "id": "labelsToFields", + "options": { + "keepLabels": [ + "namespace", + "pod", + "reason", + "container" + ], + "mode": "columns" + } + }, + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "namespace", + "pod", + "reason", + "container" + ] + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "includeByName": {}, + "indexByName": {}, + "renameByName": { + "container": "Container", + "namespace": "Namespace", + "pod": "Pod Name", + "reason": "Reason" + } + } + }, + { + "id": "sortBy", + "options": { + "fields": {}, + "sort": [ + { + "field": "Pod Name" + } + ] + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto", + "wrapText": false + }, + "filterable": true, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 1 + }, + { + "color": "red", + "value": 5 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "condition" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "mappings", + "value": [ + { + "options": { + "false": { + "color": "light-red", + "index": 0, + "text": "False" + } + }, + "type": "value" + } + ] + }, + { + "id": "custom.width", + "value": 104 + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 47 + }, + "id": 64, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "11.3.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "kube_pod_status_scheduled{condition=\"false\"} == 1", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "Unscheduled Pods", + "transformations": [ + { + "id": "labelsToFields", + "options": { + "keepLabels": [ + "namespace", + "pod", + "reason", + "container" + ], + "mode": "columns" + } + }, + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "container", + "namespace", + "pod", + "condition" + ] + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "includeByName": {}, + "indexByName": { + "condition": 3, + "container": 0, + "namespace": 1, + "pod": 2 + }, + "renameByName": { + "condition": "Condition", + "container": "Container", + "namespace": "Namespace", + "pod": "Pod Name" + } + } + } + ], + "type": "table" + }, { "collapsed": false, "datasource": { @@ -2103,7 +2434,7 @@ "h": 1, "w": 24, "x": 0, - "y": 47 + "y": 55 }, "id": 45, "panels": [], @@ -2184,7 +2515,7 @@ "h": 8, "w": 12, "x": 0, - "y": 48 + "y": 56 }, "id": 31, "options": { @@ -2292,7 +2623,7 @@ "h": 8, "w": 12, "x": 12, - "y": 48 + "y": 56 }, "id": 34, "options": { @@ -2400,7 +2731,7 @@ "h": 8, "w": 12, "x": 0, - "y": 56 + "y": 64 }, "id": 36, "options": { @@ -2508,7 +2839,7 @@ "h": 8, "w": 12, "x": 12, - "y": 56 + "y": 64 }, "id": 37, "options": { @@ -2749,6 +3080,6 @@ "timezone": "", "title": "Kubernetes / Views / Pods", "uid": "k8s_views_pods", - "version": 36, + "version": 37, "weekStart": "" }