From f3de272c697c99b300f7fa0b9e36924802a354c1 Mon Sep 17 00:00:00 2001 From: Nils Stinnesbeck Date: Sat, 17 Oct 2026 21:59:17 +0200 Subject: [PATCH] Grafana: map zooms to the route; plain hyphens in titles - "Where the car was" fits the route again: in Grafana's fit view the zoom value is the maximum zoom, and 6 held it at country level. Now 15 with 10 % padding. Checked by rendering the Live dashboard with a simulated 10 km drive. - Dashboard titles use "-" instead of an em dash: "MG4 - Live", "MG4 - Consumption", "MG4 - Charging". - SPECS.md: Grafana keeps its state in SQLite on its PVC, which is why it runs as one replica with Recreate; high availability needs PostgreSQL or MySQL first. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01QLJfZQZeAKAwSqViTmLzki --- SPECS.md | 7 +++++++ k8s/grafana/dashboards/charging.json | 2 +- k8s/grafana/dashboards/consumption.json | 2 +- k8s/grafana/dashboards/live.json | 5 +++-- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/SPECS.md b/SPECS.md index a0e0914..5423990 100644 --- a/SPECS.md +++ b/SPECS.md @@ -56,6 +56,13 @@ car ──live telemetry───▶ car.k8s.stinnesbeck.com (Go) ──▶ ABRP (`ALLOWED_HOSTS`). For git.stinnesbeck.com it needs the host on the allowlist, and the response parsing checked against that server's releases API. Release assets must be named `NilsMG4-unstable-.apk` with a `.sha256` sidecar (`build-car` writes both). +- [ ] **Grafana high availability needs another database.** Grafana keeps its own state (users, + sessions, preferences, provisioned-dashboard records, alerting state) in SQLite at + `/var/lib/grafana/grafana.db` on the `grafana-data` PVC. That is fine for one replica, and is + why `k8s/grafana.yaml` uses `replicas: 1` and the `Recreate` strategy: only one Grafana may + write the file. To run more than one replica, first move Grafana to PostgreSQL or MySQL + (`GF_DATABASE_TYPE`, `GF_DATABASE_HOST`, …); the replicas then share that database instead + of a volume. The car data itself is in InfluxDB and unaffected. - [ ] **Telemetry queue survives restarts.** Unsent live samples are kept in memory only. - [ ] **Translate the rest.** The docs (`CHANGELOG.md`, `OTA.md`'s message table, comments in `mise.toml`/`app/build.gradle`) are still Turkish or French. diff --git a/k8s/grafana/dashboards/charging.json b/k8s/grafana/dashboards/charging.json index 28471c1..9550abd 100644 --- a/k8s/grafana/dashboards/charging.json +++ b/k8s/grafana/dashboards/charging.json @@ -1,6 +1,6 @@ { "uid": "mg4-charging", - "title": "MG4 — Charging", + "title": "MG4 - Charging", "description": "DC charging sessions metered by the car. Prices in euro, as entered in the car's Charging tab.", "tags": [ "mg4" diff --git a/k8s/grafana/dashboards/consumption.json b/k8s/grafana/dashboards/consumption.json index 99b2078..ff1e6b3 100644 --- a/k8s/grafana/dashboards/consumption.json +++ b/k8s/grafana/dashboards/consumption.json @@ -1,6 +1,6 @@ { "uid": "mg4-consumption", - "title": "MG4 — Consumption", + "title": "MG4 - Consumption", "description": "Daily consumption, summed from the chunks the car sends while driving.", "tags": [ "mg4" diff --git a/k8s/grafana/dashboards/live.json b/k8s/grafana/dashboards/live.json index 77dda27..5046df4 100644 --- a/k8s/grafana/dashboards/live.json +++ b/k8s/grafana/dashboards/live.json @@ -1,6 +1,6 @@ { "uid": "mg4-live", - "title": "MG4 — Live", + "title": "MG4 - Live", "description": "Live telemetry from the car, as stored before it is forwarded to ABRP.", "tags": [ "mg4" @@ -488,7 +488,8 @@ "id": "fit", "lat": 0, "lon": 0, - "zoom": 6, + "zoom": 15, + "padding": 10, "allLayers": true }, "controls": {