# GENERATED by monitoring/controllers/home/dashboards/build.py — edit the script, not this file. # Provisioned by the kube-prometheus-stack dashboard sidecar (label grafana_dashboard=1, # NAMESPACE=ALL), so it wins over any UI edit. Dashboard uid: home-lab-workloads apiVersion: v1 kind: ConfigMap metadata: name: grafana-dashboard-home-lab-workloads namespace: monitoring labels: grafana_dashboard: "1" app.kubernetes.io/part-of: homelab-dashboards annotations: grafana_folder: Homelab homelab.siriusdevops.com/managed-by: monitoring/controllers/home/dashboards/build.py data: home-lab-workloads.json: | { "uid": "home-lab-workloads", "title": "Home lab workloads", "description": "Cluster-wide view: who is using CPU/memory, what is Pending or restarting, how full the nodes' disks are, and whether the WireGuard-only internal services answer.", "tags": [ "homelab", "overview" ], "timezone": "browser", "editable": true, "graphTooltip": 1, "schemaVersion": 39, "version": 1, "refresh": "30s", "time": { "from": "now-6h", "to": "now" }, "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "grafana", "uid": "-- Grafana --" }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "type": "dashboard" } ] }, "links": [], "templating": { "list": [] }, "panels": [ { "id": 46, "type": "row", "title": "Cluster", "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, "panels": [] }, { "id": 47, "type": "stat", "title": "Nodes Ready", "description": "", "datasource": { "type": "prometheus", "uid": "prometheus" }, "gridPos": { "h": 5, "w": 4, "x": 0, "y": 1 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "count(kube_node_status_condition{condition=\"Ready\",status=\"true\"} == 1)", "refId": "A", "editorMode": "code", "range": true, "instant": false } ], "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "red", "value": null }, { "color": "yellow", "value": 2 }, { "color": "green", "value": 3 } ] } }, "overrides": [] }, "options": { "colorMode": "value", "graphMode": "area", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "justifyMode": "auto" } }, { "id": 48, "type": "stat", "title": "Nodes with DiskPressure", "description": "The taint that evicted Forgejo and pg-1 in the past. >0 here is an incident, not a warning.", "datasource": { "type": "prometheus", "uid": "prometheus" }, "gridPos": { "h": 5, "w": 4, "x": 4, "y": 1 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum(kube_node_status_condition{condition=\"DiskPressure\",status=\"true\"} == 1)", "refId": "A", "editorMode": "code", "range": true, "instant": false } ], "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 1 } ] } }, "overrides": [] }, "options": { "colorMode": "value", "graphMode": "area", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "justifyMode": "auto" } }, { "id": 49, "type": "stat", "title": "Pending pods", "description": "Pods that cannot be scheduled \u2014 usually an unschedulable taint or an exhausted resource request.", "datasource": { "type": "prometheus", "uid": "prometheus" }, "gridPos": { "h": 5, "w": 4, "x": 8, "y": 1 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum(kube_pod_status_phase{phase=\"Pending\"} == 1)", "refId": "A", "editorMode": "code", "range": true, "instant": false } ], "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 1 } ] } }, "overrides": [] }, "options": { "colorMode": "value", "graphMode": "area", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "justifyMode": "auto" } }, { "id": 50, "type": "stat", "title": "Internal gateway probes OK", "description": "blackbox-exporter probes of http://10.10.0.2:8081/ and :8084/ (monitoring/controllers/home/gateway-probe.yaml). 2 = both internal services answering.", "datasource": { "type": "prometheus", "uid": "prometheus" }, "gridPos": { "h": 5, "w": 4, "x": 12, "y": 1 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum(probe_success{job=\"internal-gateway\"})", "refId": "A", "editorMode": "code", "range": true, "instant": false } ], "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "red", "value": null }, { "color": "yellow", "value": 1 }, { "color": "green", "value": 2 } ] } }, "overrides": [] }, "options": { "colorMode": "value", "graphMode": "area", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "justifyMode": "auto" } }, { "id": 51, "type": "stat", "title": "PVCs bound", "description": "", "datasource": { "type": "prometheus", "uid": "prometheus" }, "gridPos": { "h": 5, "w": 4, "x": 16, "y": 1 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum(kube_persistentvolumeclaim_status_phase{phase=\"Bound\"} == 1)", "refId": "A", "editorMode": "code", "range": true, "instant": false } ], "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "red", "value": null }, { "color": "green", "value": 1 } ] } }, "overrides": [] }, "options": { "colorMode": "value", "graphMode": "area", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "justifyMode": "auto" } }, { "id": 52, "type": "stat", "title": "PVC capacity requested", "description": "Sum of every PVC request (local-path: all on siriussec's disk). Usage per PV is not available \u2014 see the note at the bottom.", "datasource": { "type": "prometheus", "uid": "prometheus" }, "gridPos": { "h": 5, "w": 4, "x": 20, "y": 1 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum(kube_persistentvolumeclaim_resource_requests_storage_bytes)", "refId": "A", "editorMode": "code", "range": true, "instant": false } ], "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "red", "value": null }, { "color": "green", "value": 1 } ] }, "unit": "bytes" }, "overrides": [] }, "options": { "colorMode": "value", "graphMode": "area", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "justifyMode": "auto" } }, { "id": 53, "type": "row", "title": "Requests vs usage", "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 6 }, "panels": [] }, { "id": 54, "type": "timeseries", "title": "CPU usage by namespace", "description": "cAdvisor, all containers including pause-less init containers. Compare with the requests panel next to it.", "datasource": { "type": "prometheus", "uid": "prometheus" }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 7 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum by (namespace) (rate(container_cpu_usage_seconds_total{container!=\"\"}[5m]))", "refId": "A", "editorMode": "code", "range": true, "instant": false, "legendFormat": "{{namespace}}" } ], "fieldConfig": { "defaults": { "custom": { "lineWidth": 1, "fillOpacity": 0, "showPoints": "never" }, "color": { "mode": "palette-classic" }, "unit": "cores" }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom", "calcs": [ "lastNotNull" ] }, "tooltip": { "mode": "multi", "sort": "desc" } } }, { "id": 55, "type": "timeseries", "title": "CPU requests by namespace", "description": "Scheduler-visible requests \u2014 this is what makes a pod Pending, not usage.", "datasource": { "type": "prometheus", "uid": "prometheus" }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 7 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum by (namespace) (kube_pod_container_resource_requests{resource=\"cpu\"})", "refId": "A", "editorMode": "code", "range": true, "instant": false, "legendFormat": "{{namespace}}" } ], "fieldConfig": { "defaults": { "custom": { "lineWidth": 1, "fillOpacity": 0, "showPoints": "never" }, "color": { "mode": "palette-classic" }, "unit": "cores" }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom", "calcs": [ "lastNotNull" ] }, "tooltip": { "mode": "multi", "sort": "desc" } } }, { "id": 56, "type": "timeseries", "title": "Memory usage by namespace", "description": "", "datasource": { "type": "prometheus", "uid": "prometheus" }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 15 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum by (namespace) (container_memory_working_set_bytes{container!=\"\"})", "refId": "A", "editorMode": "code", "range": true, "instant": false, "legendFormat": "{{namespace}}" } ], "fieldConfig": { "defaults": { "custom": { "lineWidth": 1, "fillOpacity": 0, "showPoints": "never" }, "color": { "mode": "palette-classic" }, "unit": "bytes" }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom", "calcs": [ "lastNotNull" ] }, "tooltip": { "mode": "multi", "sort": "desc" } } }, { "id": 57, "type": "timeseries", "title": "Memory requests by namespace", "description": "", "datasource": { "type": "prometheus", "uid": "prometheus" }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 15 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum by (namespace) (kube_pod_container_resource_requests{resource=\"memory\"})", "refId": "A", "editorMode": "code", "range": true, "instant": false, "legendFormat": "{{namespace}}" } ], "fieldConfig": { "defaults": { "custom": { "lineWidth": 1, "fillOpacity": 0, "showPoints": "never" }, "color": { "mode": "palette-classic" }, "unit": "bytes" }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom", "calcs": [ "lastNotNull" ] }, "tooltip": { "mode": "multi", "sort": "desc" } } }, { "id": 58, "type": "row", "title": "Top pods", "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 23 }, "panels": [] }, { "id": 59, "type": "timeseries", "title": "Top 10 pods by CPU", "description": "", "datasource": { "type": "prometheus", "uid": "prometheus" }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 24 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "topk(10, sum by (namespace, pod) (rate(container_cpu_usage_seconds_total{container!=\"\"}[5m])))", "refId": "A", "editorMode": "code", "range": true, "instant": false, "legendFormat": "{{namespace}}/{{pod}}" } ], "fieldConfig": { "defaults": { "custom": { "lineWidth": 1, "fillOpacity": 0, "showPoints": "never" }, "color": { "mode": "palette-classic" }, "unit": "cores" }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom", "calcs": [ "lastNotNull" ] }, "tooltip": { "mode": "multi", "sort": "desc" } } }, { "id": 60, "type": "timeseries", "title": "Top 10 pods by memory", "description": "", "datasource": { "type": "prometheus", "uid": "prometheus" }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 24 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "topk(10, sum by (namespace, pod) (container_memory_working_set_bytes{container!=\"\"}))", "refId": "A", "editorMode": "code", "range": true, "instant": false, "legendFormat": "{{namespace}}/{{pod}}" } ], "fieldConfig": { "defaults": { "custom": { "lineWidth": 1, "fillOpacity": 0, "showPoints": "never" }, "color": { "mode": "palette-classic" }, "unit": "bytes" }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom", "calcs": [ "lastNotNull" ] }, "tooltip": { "mode": "multi", "sort": "desc" } } }, { "id": 61, "type": "timeseries", "title": "Pod restarts (24h, top 10)", "description": "increase() over 24h. Values below 1 are container restarts that happened before the current scrape window started.", "datasource": { "type": "prometheus", "uid": "prometheus" }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 32 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "topk(10, sum by (namespace, pod) (increase(kube_pod_container_status_restarts_total[24h])))", "refId": "A", "editorMode": "code", "range": true, "instant": false, "legendFormat": "{{namespace}}/{{pod}}" } ], "fieldConfig": { "defaults": { "custom": { "lineWidth": 1, "fillOpacity": 0, "showPoints": "never" }, "color": { "mode": "palette-classic" }, "unit": "short" }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom", "calcs": [ "lastNotNull" ] }, "tooltip": { "mode": "multi", "sort": "desc" } } }, { "id": 62, "type": "timeseries", "title": "Internal gateway probe result", "description": "1 = HTTP 2xx/3xx from blackbox-exporter every 30s. There is no Alertmanager in this stack, so this panel and Prometheus /alerts are the alerting surface.", "datasource": { "type": "prometheus", "uid": "prometheus" }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 32 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "probe_success{job=\"internal-gateway\"}", "refId": "A", "editorMode": "code", "range": true, "instant": false, "legendFormat": "{{instance}}" } ], "fieldConfig": { "defaults": { "custom": { "lineWidth": 1, "fillOpacity": 0, "showPoints": "never" }, "color": { "mode": "palette-classic" }, "unit": "short" }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom", "calcs": [ "lastNotNull" ] }, "tooltip": { "mode": "multi", "sort": "desc" } } }, { "id": 63, "type": "row", "title": "Nodes", "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 40 }, "panels": [] }, { "id": 64, "type": "timeseries", "title": "Node CPU utilisation", "description": "", "datasource": { "type": "prometheus", "uid": "prometheus" }, "gridPos": { "h": 8, "w": 8, "x": 0, "y": 41 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "100 * (1 - avg by (instance) (rate(node_cpu_seconds_total{mode=\"idle\"}[5m])))", "refId": "A", "editorMode": "code", "range": true, "instant": false, "legendFormat": "{{instance}}" } ], "fieldConfig": { "defaults": { "custom": { "lineWidth": 1, "fillOpacity": 0, "showPoints": "never" }, "color": { "mode": "palette-classic" }, "unit": "percent" }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom", "calcs": [ "lastNotNull" ] }, "tooltip": { "mode": "multi", "sort": "desc" } } }, { "id": 65, "type": "timeseries", "title": "Node memory used", "description": "", "datasource": { "type": "prometheus", "uid": "prometheus" }, "gridPos": { "h": 8, "w": 8, "x": 8, "y": 41 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "100 * (1 - node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes)", "refId": "A", "editorMode": "code", "range": true, "instant": false, "legendFormat": "{{instance}}" } ], "fieldConfig": { "defaults": { "custom": { "lineWidth": 1, "fillOpacity": 0, "showPoints": "never" }, "color": { "mode": "palette-classic" }, "unit": "percent" }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom", "calcs": [ "lastNotNull" ] }, "tooltip": { "mode": "multi", "sort": "desc" } } }, { "id": 66, "type": "timeseries", "title": "Filesystem used %", "description": "Root filesystem per node \u2014 the local-path PVs, the dind data-root and the Pi's host-docker job containers all land on these.", "datasource": { "type": "prometheus", "uid": "prometheus" }, "gridPos": { "h": 8, "w": 8, "x": 16, "y": 41 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "100 * (1 - node_filesystem_avail_bytes{mountpoint=\"/\",fstype!~\"tmpfs|overlay\"} / node_filesystem_size_bytes{mountpoint=\"/\",fstype!~\"tmpfs|overlay\"})", "refId": "A", "editorMode": "code", "range": true, "instant": false, "legendFormat": "{{instance}} /" } ], "fieldConfig": { "defaults": { "custom": { "lineWidth": 1, "fillOpacity": 0, "showPoints": "never" }, "color": { "mode": "palette-classic" }, "unit": "percent" }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom", "calcs": [ "lastNotNull" ] }, "tooltip": { "mode": "multi", "sort": "desc" } } }, { "id": 67, "type": "text", "title": "Known unknowns on this board", "gridPos": { "h": 8, "w": 24, "x": 0, "y": 49 }, "options": { "mode": "markdown", "code": { "language": "plaintext", "showLineNumbers": false, "showMiniMap": false }, "content": "- **PVC usage is not charted, only requested capacity.** local-path provisions `hostPath` PVs and kubelet\n publishes no `kubelet_volume_stats_used_bytes` for them (this cluster only emits the\n `kubelet_volume_metric_collection_duration_seconds` histograms). Node filesystem usage is the honest\n proxy for \"how full is the disk these PVs live on\".\n- **Namespaces are not filtered.** With this few workloads an unfiltered board is more useful than a\n variable that hides the one namespace you needed to see.\n- **No Alertmanager.** Alerts from `PrometheusRule` objects are visible in Prometheus /alerts and in\n Grafana \u2192 Alerting, but nothing pages.\n" } } ] }