{ "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "grafana", "uid": "-- Grafana --" }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "type": "dashboard" } ] }, "description": "Docker container monitoring for puck.incus - Red Panda Approved 🐼", "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, "id": null, "links": [ { "asDropdown": false, "icon": "external link", "includeVars": true, "keepTime": true, "tags": [], "targetBlank": true, "title": "Explore Logs", "tooltip": "View Docker logs in Loki for puck.incus", "type": "link", "url": "/explore?orgId=1&left=%7B%22datasource%22:%22prospero-loki%22,%22queries%22:%5B%7B%22refId%22:%22A%22,%22expr%22:%22%7Bhostname%3D%5C%22puck.incus%5C%22%7D%20%7C%3D%20%5C%22docker%5C%22%20or%20%7C%3D%20%5C%22container%5C%22%22%7D%5D%7D" }, { "asDropdown": false, "icon": "dashboard", "includeVars": true, "keepTime": true, "tags": [], "targetBlank": false, "title": "Process Monitoring", "tooltip": "View process-level metrics", "type": "link", "url": "/d/puck-process-monitoring" } ], "panels": [ { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, "id": 100, "panels": [], "title": "Container Overview", "type": "row" }, { "datasource": { "type": "prometheus", "uid": "prospero-prometheus" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "yellow", "value": 3 }, { "color": "red", "value": 5 } ] }, "unit": "short" }, "overrides": [] }, "gridPos": { "h": 5, "w": 4, "x": 0, "y": 1 }, "id": 1, "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false }, "textMode": "auto" }, "pluginVersion": "10.2.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "prospero-prometheus" }, "expr": "count(container_last_seen{instance=~\"puck.*\", name!=\"\", name!=\"POD\"})", "legendFormat": "Running Containers", "refId": "A" } ], "title": "Running Containers", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "prospero-prometheus" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "orange", "value": 1 }, { "color": "red", "value": 2 } ] }, "unit": "short" }, "overrides": [] }, "gridPos": { "h": 5, "w": 4, "x": 4, "y": 1 }, "id": 2, "options": { "colorMode": "value", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false }, "textMode": "auto" }, "pluginVersion": "10.2.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "prospero-prometheus" }, "expr": "count(container_last_seen{instance=~\"puck.*\", name=~\".*_.*\", name!=\"POD\"}) or vector(0)", "legendFormat": "Auto-Named", "refId": "A" } ], "title": "Auto-Named (Orphan Candidates)", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "prospero-prometheus" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 1 } ] }, "unit": "short" }, "overrides": [] }, "gridPos": { "h": 5, "w": 4, "x": 8, "y": 1 }, "id": 3, "options": { "colorMode": "value", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false }, "textMode": "auto" }, "pluginVersion": "10.2.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "prospero-prometheus" }, "expr": "count(container_last_seen{instance=~\"puck.*\", image=~\".*mcp-server.*|.*mcp_server.*\"}) or vector(0)", "legendFormat": "MCP Containers", "refId": "A" } ], "title": "⚠️ MCP Containers (Should be 0)", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "prospero-prometheus" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 1 } ] }, "unit": "short" }, "overrides": [] }, "gridPos": { "h": 5, "w": 4, "x": 12, "y": 1 }, "id": 4, "options": { "colorMode": "value", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false }, "textMode": "auto" }, "pluginVersion": "10.2.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "prospero-prometheus" }, "expr": "sum(increase(container_oom_events_total{instance=~\"puck.*\"}[24h])) or vector(0)", "legendFormat": "OOM Events", "refId": "A" } ], "title": "OOM Events (24h)", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "prospero-prometheus" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "hideFrom": { "legend": false, "tooltip": false, "viz": false } }, "mappings": [] }, "overrides": [] }, "gridPos": { "h": 5, "w": 8, "x": 16, "y": 1 }, "id": 5, "options": { "legend": { "displayMode": "list", "placement": "right", "showLegend": true }, "pieType": "pie", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prospero-prometheus" }, "expr": "count by (image) (container_last_seen{instance=~\"puck.*\", name!=\"\", name!=\"POD\"})", "legendFormat": "{{image}}", "refId": "A" } ], "title": "Containers by Image", "type": "piechart" }, { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 6 }, "id": 101, "panels": [], "title": "Container Resource Usage", "type": "row" }, { "datasource": { "type": "prometheus", "uid": "prospero-prometheus" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 20, "gradientMode": "none", "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": "line" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "yellow", "value": 80 }, { "color": "red", "value": 100 } ] }, "unit": "percent" }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 7 }, "id": 10, "options": { "legend": { "calcs": ["mean", "max"], "displayMode": "table", "placement": "right", "showLegend": true }, "tooltip": { "mode": "multi", "sort": "desc" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prospero-prometheus" }, "expr": "sum by (name) (rate(container_cpu_usage_seconds_total{instance=~\"puck.*\", name!=\"\", name!=\"POD\"}[2m])) * 100", "legendFormat": "{{name}}", "refId": "A" } ], "title": "Container CPU Usage", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "prospero-prometheus" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 20, "gradientMode": "none", "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": "line" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "yellow", "value": 536870912 }, { "color": "red", "value": 1073741824 } ] }, "unit": "bytes" }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 7 }, "id": 11, "options": { "legend": { "calcs": ["mean", "max"], "displayMode": "table", "placement": "right", "showLegend": true }, "tooltip": { "mode": "multi", "sort": "desc" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prospero-prometheus" }, "expr": "container_memory_usage_bytes{instance=~\"puck.*\", name!=\"\", name!=\"POD\"}", "legendFormat": "{{name}}", "refId": "A" } ], "title": "Container Memory Usage", "type": "timeseries" }, { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 15 }, "id": 102, "panels": [], "title": "Container Details", "type": "row" }, { "datasource": { "type": "prometheus", "uid": "prospero-prometheus" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "custom": { "align": "auto", "cellOptions": { "type": "auto" }, "inspect": false }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, "overrides": [ { "matcher": { "id": "byName", "options": "CPU %" }, "properties": [ { "id": "unit", "value": "percent" }, { "id": "custom.cellOptions", "value": { "mode": "basic", "type": "gauge" } }, { "id": "thresholds", "value": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "yellow", "value": 50 }, { "color": "red", "value": 80 } ] } } ] }, { "matcher": { "id": "byName", "options": "Memory" }, "properties": [ { "id": "unit", "value": "bytes" }, { "id": "custom.cellOptions", "value": { "mode": "basic", "type": "gauge" } }, { "id": "thresholds", "value": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "yellow", "value": 536870912 }, { "color": "red", "value": 1073741824 } ] } } ] }, { "matcher": { "id": "byName", "options": "Age" }, "properties": [ { "id": "unit", "value": "s" }, { "id": "thresholds", "value": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "yellow", "value": 3600 }, { "color": "orange", "value": 86400 }, { "color": "red", "value": 604800 } ] } } ] }, { "matcher": { "id": "byName", "options": "Container" }, "properties": [ { "id": "custom.width", "value": 200 } ] }, { "matcher": { "id": "byName", "options": "Image" }, "properties": [ { "id": "custom.width", "value": 300 } ] } ] }, "gridPos": { "h": 10, "w": 24, "x": 0, "y": 16 }, "id": 20, "options": { "cellHeight": "sm", "footer": { "countRows": false, "fields": "", "reducer": ["sum"], "show": false }, "showHeader": true, "sortBy": [ { "desc": true, "displayName": "Age" } ] }, "pluginVersion": "10.2.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "prospero-prometheus" }, "expr": "sum by (name, image) (rate(container_cpu_usage_seconds_total{instance=~\"puck.*\", name!=\"\", name!=\"POD\"}[2m])) * 100", "format": "table", "instant": true, "legendFormat": "__auto", "refId": "CPU" }, { "datasource": { "type": "prometheus", "uid": "prospero-prometheus" }, "expr": "container_memory_usage_bytes{instance=~\"puck.*\", name!=\"\", name!=\"POD\"}", "format": "table", "hide": false, "instant": true, "legendFormat": "__auto", "refId": "Memory" }, { "datasource": { "type": "prometheus", "uid": "prospero-prometheus" }, "expr": "time() - container_start_time_seconds{instance=~\"puck.*\", name!=\"\", name!=\"POD\"}", "format": "table", "hide": false, "instant": true, "legendFormat": "__auto", "refId": "Age" } ], "title": "All Containers", "transformations": [ { "id": "seriesToColumns", "options": { "byField": "name" } }, { "id": "organize", "options": { "excludeByName": { "Time 1": true, "Time 2": true, "Time 3": true, "id": true, "image 2": true, "image 3": true, "instance 1": true, "instance 2": true, "instance 3": true, "job 1": true, "job 2": true, "job 3": true }, "indexByName": {}, "renameByName": { "Value #Age": "Age", "Value #CPU": "CPU %", "Value #Memory": "Memory", "image 1": "Image", "name": "Container" } } } ], "type": "table" }, { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 26 }, "id": 103, "panels": [], "title": "Orphan Candidates (Auto-Named Containers > 1 hour)", "type": "row" }, { "datasource": { "type": "prometheus", "uid": "prospero-prometheus" }, "description": "Containers with Docker auto-generated names (adjective_scientist pattern) running longer than 1 hour may be orphaned and should be investigated.", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "custom": { "align": "auto", "cellOptions": { "type": "auto" }, "inspect": false }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "orange", "value": null }, { "color": "red", "value": 86400 } ] } }, "overrides": [ { "matcher": { "id": "byName", "options": "Age" }, "properties": [ { "id": "unit", "value": "s" } ] } ] }, "gridPos": { "h": 6, "w": 24, "x": 0, "y": 27 }, "id": 30, "options": { "cellHeight": "sm", "footer": { "countRows": false, "fields": "", "reducer": ["sum"], "show": false }, "showHeader": true, "sortBy": [ { "desc": true, "displayName": "Age" } ] }, "pluginVersion": "10.2.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "prospero-prometheus" }, "expr": "(time() - container_start_time_seconds{instance=~\"puck.*\", name=~\".*_.*\", name!=\"POD\"}) > 3600", "format": "table", "instant": true, "legendFormat": "__auto", "refId": "A" } ], "title": "🔍 Orphan Candidates", "transformations": [ { "id": "organize", "options": { "excludeByName": { "Time": true, "id": true, "instance": true, "job": true }, "indexByName": {}, "renameByName": { "Value": "Age", "image": "Image", "name": "Container" } } } ], "type": "table" } ], "refresh": "30s", "schemaVersion": 38, "tags": ["puck", "docker", "containers", "monitoring", "red-panda-approved"], "templating": { "list": [] }, "time": { "from": "now-1h", "to": "now" }, "timepicker": {}, "timezone": "", "title": "Puck Docker Containers", "uid": "puck-docker-containers", "version": 1, "weekStart": "" }