# services/monitoring/grafana-dashboard-pods.yaml apiVersion: v1 kind: ConfigMap metadata: name: grafana-dashboard-pods labels: grafana_dashboard: "1" data: atlas-pods.json: | { "uid": "atlas-pods", "title": "Atlas Pods", "folderUid": "atlas-pods", "editable": true, "panels": [ { "id": 1, "type": "table", "title": "Pods not running", "datasource": { "type": "prometheus", "uid": "atlas-vm" }, "gridPos": { "h": 10, "w": 24, "x": 0, "y": 0 }, "targets": [ { "expr": "(time() - kube_pod_created) * on(namespace,pod) group_left(node) kube_pod_info * on(namespace,pod) group_left(phase) sum by (namespace,pod,phase) (kube_pod_status_phase{phase!~\"Running|Succeeded\"})", "refId": "A" } ], "fieldConfig": { "defaults": { "unit": "s" }, "overrides": [] }, "options": { "showHeader": true }, "transformations": [ { "id": "labelsToFields", "options": {} } ] }, { "id": 2, "type": "table", "title": "CrashLoop / ImagePull", "datasource": { "type": "prometheus", "uid": "atlas-vm" }, "gridPos": { "h": 10, "w": 24, "x": 0, "y": 10 }, "targets": [ { "expr": "(time() - kube_pod_created) * on(namespace,pod) group_left(node) kube_pod_info * on(namespace,pod,container) group_left(reason) sum by (namespace,pod,reason) (kube_pod_container_status_waiting_reason{reason=~\"CrashLoopBackOff|ImagePullBackOff\"})", "refId": "A" } ], "fieldConfig": { "defaults": { "unit": "s" }, "overrides": [] }, "options": { "showHeader": true }, "transformations": [ { "id": "labelsToFields", "options": {} } ] }, { "id": 3, "type": "table", "title": "Terminating pods", "datasource": { "type": "prometheus", "uid": "atlas-vm" }, "gridPos": { "h": 10, "w": 24, "x": 0, "y": 20 }, "targets": [ { "expr": "(time() - kube_pod_deletion_timestamp) * on(namespace,pod) group_left(node) kube_pod_info", "refId": "A" } ], "fieldConfig": { "defaults": { "unit": "s" }, "overrides": [] }, "options": { "showHeader": true }, "transformations": [ { "id": "labelsToFields", "options": {} }, { "id": "filterByValue", "options": { "match": "Value", "operator": "gt", "value": 600 } } ] } ], "time": { "from": "now-12h", "to": "now" }, "annotations": { "list": [] }, "schemaVersion": 39, "style": "dark", "tags": [ "atlas", "pods" ] }