Dashboards (uid forgejo-runners, cnpg-postgres, home-lab-workloads) live as ConfigMaps generated from monitoring/controllers/home/dashboards/build.py and are loaded by the kube-prometheus-stack grafana sidecar. Postgres was not scraped at all before this: add a hand-written PodMonitor per CNPG cluster (release=kube-prometheus-stack, which is what this Prometheus's podMonitorSelectorNilUsesHelmValues default requires) plus spec.monitoring.customQueriesConfigMap on both Clusters. enablePodMonitor stays false — deprecated in CNPG 1.27 and it gives no control over labels. pg-actions-queries.yaml adds the Forgejo Actions queue/outcome/last_online metrics that only the forgejo database can answer. prometheus-node-exporter is no longer pinned to siriussec: the arm64 runner's jobs are host containers on rpi, so the Pi's root filesystem is the disk that matters there and kubelet cannot see it. docs/monitoring-dashboards.md documents the PromQL, the exporter GRANT and the known unknowns (arm64 per-job breakdown, hostPath PVs have no kubelet volume stats, single-instance replication, no backups).
1209 lines
35 KiB
YAML
1209 lines
35 KiB
YAML
# 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: forgejo-runners
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: grafana-dashboard-forgejo-runners
|
|
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:
|
|
forgejo-runners.json: |
|
|
{
|
|
"uid": "forgejo-runners",
|
|
"title": "Forgejo Runners",
|
|
"description": "Runner health as the cluster sees it (kube-state-metrics/cAdvisor) and as Forgejo sees it (action_runner.last_online, action_run_job), plus the filesystem that the dind data-root and the Pi's host-docker jobs consume.",
|
|
"tags": [
|
|
"homelab",
|
|
"forgejo",
|
|
"runners"
|
|
],
|
|
"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": 1,
|
|
"type": "row",
|
|
"title": "Runners & queue",
|
|
"collapsed": false,
|
|
"gridPos": {
|
|
"h": 1,
|
|
"w": 24,
|
|
"x": 0,
|
|
"y": 0
|
|
},
|
|
"panels": []
|
|
},
|
|
{
|
|
"id": 2,
|
|
"type": "stat",
|
|
"title": "Runner pods Ready",
|
|
"description": "replicas_ready summed across the three runner Deployments. Expected 3.",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"h": 5,
|
|
"w": 4,
|
|
"x": 0,
|
|
"y": 1
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "sum(kube_deployment_status_replicas_ready{namespace=\"forgejo\",deployment=~\"forgejo-runner-.*\"})",
|
|
"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": 3,
|
|
"type": "stat",
|
|
"title": "Runner pods not Ready",
|
|
"description": "Running-but-not-Ready runner pods (crashloop, failing probe).",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"h": 5,
|
|
"w": 4,
|
|
"x": 4,
|
|
"y": 1
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "sum(kube_pod_status_ready{namespace=\"forgejo\",pod=~\"forgejo-runner-.*\",condition=\"false\"} == 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": 4,
|
|
"type": "stat",
|
|
"title": "Last runner poll age",
|
|
"description": "Worst of the three runners, from Forgejo's action_runner.last_online. A Running pod whose poll age climbs is a runner that cannot reach the forge.",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"h": 5,
|
|
"w": 4,
|
|
"x": 8,
|
|
"y": 1
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "max(cnpg_actions_runners_last_online_seconds{cluster=\"pg\"})",
|
|
"refId": "A",
|
|
"editorMode": "code",
|
|
"range": true,
|
|
"instant": false
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "thresholds"
|
|
},
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": null
|
|
},
|
|
{
|
|
"color": "yellow",
|
|
"value": 90
|
|
},
|
|
{
|
|
"color": "red",
|
|
"value": 300
|
|
}
|
|
]
|
|
},
|
|
"unit": "s"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"colorMode": "value",
|
|
"graphMode": "area",
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"lastNotNull"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"textMode": "auto",
|
|
"justifyMode": "auto"
|
|
}
|
|
},
|
|
{
|
|
"id": 5,
|
|
"type": "stat",
|
|
"title": "Queue depth",
|
|
"description": "Jobs assigned to a runner that have not started (action_run_job: started=0, stopped=0, status<>4).",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"h": 5,
|
|
"w": 4,
|
|
"x": 12,
|
|
"y": 1
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "max(cnpg_actions_queue_depth{cluster=\"pg\"})",
|
|
"refId": "A",
|
|
"editorMode": "code",
|
|
"range": true,
|
|
"instant": false
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "thresholds"
|
|
},
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": null
|
|
},
|
|
{
|
|
"color": "yellow",
|
|
"value": 1
|
|
},
|
|
{
|
|
"color": "red",
|
|
"value": 3
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"colorMode": "value",
|
|
"graphMode": "area",
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"lastNotNull"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"textMode": "auto",
|
|
"justifyMode": "auto"
|
|
}
|
|
},
|
|
{
|
|
"id": 6,
|
|
"type": "stat",
|
|
"title": "Running now",
|
|
"description": "Jobs currently executing. capacity=1 per runner, so >3 here means something is stuck.",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"h": 5,
|
|
"w": 4,
|
|
"x": 16,
|
|
"y": 1
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "max(cnpg_actions_running_total{cluster=\"pg\"})",
|
|
"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": 7,
|
|
"type": "stat",
|
|
"title": "Queue while running = contention",
|
|
"description": "1 = jobs are queued while another job runs, i.e. the single-slot runners are the bottleneck (this is why capacity stays 1: two concurrent jobs clobbered the shared docker volumes).",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"h": 5,
|
|
"w": 4,
|
|
"x": 20,
|
|
"y": 1
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "max((cnpg_actions_queue_depth{cluster=\"pg\"} > bool 0) * (cnpg_actions_running_total{cluster=\"pg\"} > bool 0))",
|
|
"refId": "A",
|
|
"editorMode": "code",
|
|
"range": true,
|
|
"instant": false
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "thresholds"
|
|
},
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": null
|
|
},
|
|
{
|
|
"color": "orange",
|
|
"value": 1
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"colorMode": "value",
|
|
"graphMode": "area",
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"lastNotNull"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"textMode": "auto",
|
|
"justifyMode": "auto"
|
|
}
|
|
},
|
|
{
|
|
"id": 8,
|
|
"type": "row",
|
|
"title": "Action throughput & outcomes",
|
|
"collapsed": false,
|
|
"gridPos": {
|
|
"h": 1,
|
|
"w": 24,
|
|
"x": 0,
|
|
"y": 6
|
|
},
|
|
"panels": []
|
|
},
|
|
{
|
|
"id": 9,
|
|
"type": "timeseries",
|
|
"title": "Jobs finished, by status (24h window)",
|
|
"description": "Rolling 24h count of action_run_job rows with stopped in the window. status 1=success 2=failure 3=cancelled 4=skipped (codes validated against /api/v1 .../actions/runs).",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"h": 8,
|
|
"w": 8,
|
|
"x": 0,
|
|
"y": 7
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "cnpg_actions_jobs_window_total{cluster=\"pg\",window=\"24h\"}",
|
|
"refId": "A",
|
|
"editorMode": "code",
|
|
"range": true,
|
|
"instant": false,
|
|
"legendFormat": "status {{status}}"
|
|
}
|
|
],
|
|
"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": 10,
|
|
"type": "timeseries",
|
|
"title": "Successes / hour and failures / hour",
|
|
"description": "Jobs that finished inside the last rolling hour. A true rolling count, not rate() over a row count \u2014 Forgejo prunes rows, so rate() would drift.",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"h": 8,
|
|
"w": 8,
|
|
"x": 8,
|
|
"y": 7
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "max(cnpg_actions_jobs_window_total{cluster=\"pg\",window=\"1h\",status=\"1\"})",
|
|
"refId": "A",
|
|
"editorMode": "code",
|
|
"range": true,
|
|
"instant": false,
|
|
"legendFormat": "success, last 60m"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "max(cnpg_actions_jobs_window_total{cluster=\"pg\",window=\"1h\",status=\"2\"})",
|
|
"refId": "B",
|
|
"editorMode": "code",
|
|
"range": true,
|
|
"instant": false,
|
|
"legendFormat": "failure, last 60m"
|
|
}
|
|
],
|
|
"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": 11,
|
|
"type": "timeseries",
|
|
"title": "Oldest not-yet-started job age",
|
|
"description": "How long the oldest queued job has been waiting. Flat 0 = nothing queued.",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"h": 8,
|
|
"w": 8,
|
|
"x": 16,
|
|
"y": 7
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "cnpg_actions_queue_oldest_pending_seconds{cluster=\"pg\"}",
|
|
"refId": "A",
|
|
"editorMode": "code",
|
|
"range": true,
|
|
"instant": false
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {
|
|
"lineWidth": 1,
|
|
"fillOpacity": 0,
|
|
"showPoints": "never"
|
|
},
|
|
"color": {
|
|
"mode": "palette-classic"
|
|
},
|
|
"unit": "s"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom",
|
|
"calcs": [
|
|
"lastNotNull"
|
|
]
|
|
},
|
|
"tooltip": {
|
|
"mode": "multi",
|
|
"sort": "desc"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 12,
|
|
"type": "row",
|
|
"title": "Runner pods",
|
|
"collapsed": false,
|
|
"gridPos": {
|
|
"h": 1,
|
|
"w": 24,
|
|
"x": 0,
|
|
"y": 15
|
|
},
|
|
"panels": []
|
|
},
|
|
{
|
|
"id": 13,
|
|
"type": "timeseries",
|
|
"title": "Runner pod restarts (24h)",
|
|
"description": "increase() over 24h from kube-state-metrics. The history behind this board: the amd64 runner crashlooped on dind socket permissions.",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"h": 8,
|
|
"w": 8,
|
|
"x": 0,
|
|
"y": 16
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "sum by (pod, container) (increase(kube_pod_container_status_restarts_total{namespace=\"forgejo\",pod=~\"forgejo-runner-.*\"}[24h]))",
|
|
"refId": "A",
|
|
"editorMode": "code",
|
|
"range": true,
|
|
"instant": false,
|
|
"legendFormat": "{{pod}} / {{container}}"
|
|
}
|
|
],
|
|
"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": 14,
|
|
"type": "timeseries",
|
|
"title": "CPU usage per runner pod",
|
|
"description": "cAdvisor CPU per runner pod. The dind sidecar of forgejo-runner-amd64 does the actual build work.",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"h": 8,
|
|
"w": 8,
|
|
"x": 8,
|
|
"y": 16
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "sum by (pod) (rate(container_cpu_usage_seconds_total{namespace=\"forgejo\",pod=~\"forgejo-runner-.*\",container!=\"\"}[5m]))",
|
|
"refId": "A",
|
|
"editorMode": "code",
|
|
"range": true,
|
|
"instant": false,
|
|
"legendFormat": "{{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": 15,
|
|
"type": "timeseries",
|
|
"title": "Memory working set per runner pod",
|
|
"description": "cAdvisor working set. Note the amd64 runner's dind keeps a 1Gi memory limit \u2014 a build that OOMs shows here first.",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"h": 8,
|
|
"w": 8,
|
|
"x": 16,
|
|
"y": 16
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "sum by (pod) (container_memory_working_set_bytes{namespace=\"forgejo\",pod=~\"forgejo-runner-.*\",container!=\"\"}",
|
|
"refId": "A",
|
|
"editorMode": "code",
|
|
"range": true,
|
|
"instant": false,
|
|
"legendFormat": "{{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": 16,
|
|
"type": "row",
|
|
"title": "Disk \u2014 the one that actually bites",
|
|
"collapsed": false,
|
|
"gridPos": {
|
|
"h": 1,
|
|
"w": 24,
|
|
"x": 0,
|
|
"y": 24
|
|
},
|
|
"panels": []
|
|
},
|
|
{
|
|
"id": 17,
|
|
"type": "timeseries",
|
|
"title": "Runner pod network I/O",
|
|
"description": "Image pulls and artifact traffic through the pod interface.",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"h": 8,
|
|
"w": 8,
|
|
"x": 0,
|
|
"y": 25
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "sum by (pod) (rate(container_network_receive_bytes_total{namespace=\"forgejo\",pod=~\"forgejo-runner-.*\"}[5m]))",
|
|
"refId": "A",
|
|
"editorMode": "code",
|
|
"range": true,
|
|
"instant": false,
|
|
"legendFormat": "{{pod}} in"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "sum by (pod) (rate(container_network_transmit_bytes_total{namespace=\"forgejo\",pod=~\"forgejo-runner-.*\"}[5m]))",
|
|
"refId": "B",
|
|
"editorMode": "code",
|
|
"range": true,
|
|
"instant": false,
|
|
"legendFormat": "{{pod}} out"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {
|
|
"lineWidth": 1,
|
|
"fillOpacity": 0,
|
|
"showPoints": "never"
|
|
},
|
|
"color": {
|
|
"mode": "palette-classic"
|
|
},
|
|
"unit": "Bps"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom",
|
|
"calcs": [
|
|
"lastNotNull"
|
|
]
|
|
},
|
|
"tooltip": {
|
|
"mode": "multi",
|
|
"sort": "desc"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 18,
|
|
"type": "stat",
|
|
"title": "dind PVC nominal size",
|
|
"description": "Requested size of the forgejo-runner-amd64 PVC (docker data-root + named CI volumes). This is the ceiling, not the usage \u2014 see the note on this row.",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"h": 8,
|
|
"w": 4,
|
|
"x": 8,
|
|
"y": 25
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "max(kube_persistentvolumeclaim_resource_requests_storage_bytes{namespace=\"forgejo\",persistentvolumeclaim=\"forgejo-runner-amd64\"})",
|
|
"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": 19,
|
|
"type": "stat",
|
|
"title": "siriussec root fs used",
|
|
"description": "The dind data-root lives on /opt/local-path-provisioner inside this filesystem, so this IS the number that caused the DiskPressure evictions at ~86%.",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"h": 8,
|
|
"w": 4,
|
|
"x": 12,
|
|
"y": 25
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "100 * (1 - node_filesystem_avail_bytes{instance=\"10.10.0.2:9100\",mountpoint=\"/\"} / node_filesystem_size_bytes{instance=\"10.10.0.2:9100\",mountpoint=\"/\"})",
|
|
"refId": "A",
|
|
"editorMode": "code",
|
|
"range": true,
|
|
"instant": false
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "thresholds"
|
|
},
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": null
|
|
},
|
|
{
|
|
"color": "yellow",
|
|
"value": 75
|
|
},
|
|
{
|
|
"color": "red",
|
|
"value": 85
|
|
}
|
|
]
|
|
},
|
|
"unit": "percent"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"colorMode": "value",
|
|
"graphMode": "area",
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"lastNotNull"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"textMode": "auto",
|
|
"justifyMode": "auto"
|
|
}
|
|
},
|
|
{
|
|
"id": 20,
|
|
"type": "stat",
|
|
"title": "siriussec days to full",
|
|
"description": "Linear projection from the last hour of free-space trend; 365 = not shrinking. Only meaningful after a few hours of history.",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"h": 8,
|
|
"w": 4,
|
|
"x": 16,
|
|
"y": 25
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "clamp_max(node_filesystem_avail_bytes{instance=\"10.10.0.2:9100\",mountpoint=\"/\"} / clamp_min(-deriv(node_filesystem_avail_bytes{instance=\"10.10.0.2:9100\",mountpoint=\"/\"}[1h]), 0.0000001) / 86400, 365)",
|
|
"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": 30
|
|
},
|
|
{
|
|
"color": "green",
|
|
"value": 90
|
|
}
|
|
]
|
|
},
|
|
"unit": "d",
|
|
"decimals": 1
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"colorMode": "value",
|
|
"graphMode": "area",
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"lastNotNull"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"textMode": "auto",
|
|
"justifyMode": "auto"
|
|
}
|
|
},
|
|
{
|
|
"id": 21,
|
|
"type": "timeseries",
|
|
"title": "rpi root fs used %",
|
|
"description": "The arm64 runners run their jobs as HOST docker containers on rpi, so their writes land here, not in any PVC. node-exporter on rpi is what makes this visible.",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"h": 8,
|
|
"w": 4,
|
|
"x": 20,
|
|
"y": 25
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "100 * (1 - node_filesystem_avail_bytes{instance=\"10.10.0.1:9100\",mountpoint=\"/\"} / node_filesystem_size_bytes{instance=\"10.10.0.1:9100\",mountpoint=\"/\"})",
|
|
"refId": "A",
|
|
"editorMode": "code",
|
|
"range": true,
|
|
"instant": false
|
|
}
|
|
],
|
|
"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": 22,
|
|
"type": "text",
|
|
"title": "What this board can and cannot see",
|
|
"gridPos": {
|
|
"h": 7,
|
|
"w": 24,
|
|
"x": 0,
|
|
"y": 33
|
|
},
|
|
"options": {
|
|
"mode": "markdown",
|
|
"code": {
|
|
"language": "plaintext",
|
|
"showLineNumbers": false,
|
|
"showMiniMap": false
|
|
},
|
|
"content": "**Measured:** runner Deployments (kube-state-metrics), runner pods CPU/mem/net/restarts (cAdvisor),\nrunner liveness as *Forgejo* sees it (`action_runner.last_online`), queue depth and job outcomes\n(`action_run_job` via the CNPG exporter), and the host filesystems that CI fills (node-exporter).\n\n**Not measurable \u2014 by design, not by omission:**\n\n- **Per-job breakdown on the arm64 runner.** `forgejo-runner-arm64` and\n `forgejo-runner-deploy-arm64` drive the **host** Docker socket (gid 984), so their jobs are\n plain host containers with no pod identity. cAdvisor/kube-state-metrics see only the runner\n pod itself. There is no per-job CPU/mem/disk on rpi and there cannot be one without changing\n the runner to dind \u2014 which this board deliberately does not propose.\n- **Per-PV bytes for the dind PVC.** local-path PVs are `hostPath`, and kubelet publishes no\n `kubelet_volume_stats_*` for hostPath volumes (verified: the only `kubelet_volume_*` series on\n this cluster are the collector-duration histograms). The usable proxy is siriussec's root\n filesystem usage plus the PVC's requested size, both on this row.\n"
|
|
}
|
|
}
|
|
]
|
|
}
|