3.1 KiB
Debian monitoring
Prometheus, Alertmanager and Grafana run in the homelab-prometheus Compose
project on Debian's local NVMe. The Prometheus Operator, kube-state-metrics,
node exporters and ServiceMonitor/PrometheusRule resources remain in K3s.
Loki and Tempo remain in the cluster.
Run on Debian:
./jeannie monitoring plan
./jeannie monitoring migrate
./jeannie monitoring status
migrate verifies the pinned cluster, validates exported configuration using
promtool/amtool, stops only the three backends using the existing Helm release,
then copies their offline volumes. It preserves the original PVCs and stores
compressed archives, PVC identities and original Helm values under
/data/homelab-monitoring/backup. Grafana's existing SQLite database is copied
using SQLite's backup API, preserving users, saved dashboards and Dex account
links. Existing seven-day Prometheus retention still applies; backup archives
remain independent of TSDB retention.
The chart keeps the backend controllers intentionally at zero replicas.
A post-renderer retains their Service names and supplies Debian Endpoints,
preserving in-cluster URLs and ServiceMonitor discovery. It supports Helm 3
executables and an isolated Helm 4 postrenderer plugin. OpenTofu uses the same
desired configuration, so a subsequent ./jeannie platform monitoring keeps
the backends on Debian.
The OCI edge forwards the three public hostnames directly to Debian through Tailscale. Migration uses an Nginx-only validated reload, without pulling or recreating the other containers on the small edge VM. ACME challenge paths are retained for certificate renewal. Grafana retains its public URL, Dex client ID/secret and datasource UIDs. The cluster Grafana OAuth secret remains the source consumed by the existing SOPS/Dex deployment pipeline; this migration does not rotate it.
./jeannie monitoring apply is idempotent after migration. refresh updates
Operator-generated discovery, alert rules, datasources and dashboard files.
The installed homelab-monitoring-refresh.timer runs every five minutes under
the Debian operator account, using a durable installed script rather than the
checkout used for migration. It refreshes an hour-lived token for the existing
Prometheus service account; containers do not receive the administrator
kubeconfig. Existing configuration remains running if the cluster API is down.
Dashboard files reload automatically; changes to Grafana OAuth configuration
or datasources restart Grafana. grafana-dashboards apply also refreshes the
external instance.
Only routes for the declared cluster service CIDR and discovered Calico pools are installed through the Orange Pi. Configuration and backups live in a private installation directory. Docker memory caps are 1536 MiB for Prometheus, 512 MiB for Grafana and 256 MiB for Alertmanager. Coordinate LLM benchmarks with the remaining Debian memory; moving monitoring does not reserve host RAM.
The migration does not repair the Orange Pi SSD or migrate Loki. A down Loki target remains a real failure, rather than being hidden by this move. Original PVCs and backups should be retained until recovery requirements are reviewed.