fabbr@site:~/projects/magellan/grafana$

grafana

# ~/projects/magellan/grafana.yml
grafana:
  status: active
  started: 2026-09-29
  tags: [grafana, infinity, ansible]

The cloud stores readings and answers queries, and has no UI. Grafana is what turns those answers into something to look at: one dashboard, a device at a time, and an alert when a device goes quiet. It runs on the Oracle VM from infra and reads the API worker over HTTPS, like any other client.

devices, metricsseries, latest,healthhealthAPI workerdevice andmetric menusdashboardpanelssilent alert

What it shows

  • Pick a device, pick metrics. The device list and each device’s metrics come from the API, so a new board or a new source appears in the menus without touching the dashboard.
  • Series over time. One chart draws whichever metrics are picked. The time range is handed to the API, which chooses how coarse to answer: raw readings up to two days, hourly up to ninety, daily past that.
  • Latest and health. Current values, energy today and in total, and the device’s own health: when it was last heard, gaps in its sequence, uptime and how full its buffer is.

What it watches

One alert per device: silent. If neither a batch nor a heartbeat has arrived in over an hour and a quarter, the device is down or cut off. The hourly heartbeat makes that safe at night, when the inverter has nothing to report and the device still checks in.

Decisions

  • A client, not part of the cloud. Grafana holds a read-only token of its own, revocable apart from every device’s. The cloud knows a token, not a Grafana; units, labels and thresholds live here.
  • No adapter. A generic JSON datasource, Infinity, reads the API as it is. Nothing sits between Grafana and the cloud to build or keep running.
  • Files, not clicks. The datasource, the dashboard and the alert rules are files in the infra repository, and edits in the UI are refused. A rebuilt VM comes back with the same dashboard.
  • Alerts from the inventory. Each device in the inventory gets its alert rule, so a new board is watched from the next run.
  • Alerts run on the server. Queries are parsed on Grafana’s backend, not in the browser, so the same query draws a panel and fires an alert.