burrow/infra/grafana/README.md
Conrad Kramer 002bd382e9
Some checks failed
Cache: Publish Nix / Publish Nix Cache (push) Waiting to run
Build Rust / Cargo Test (push) Successful in 4m14s
Build Site / Next.js Build (push) Failing after 6s
Infra: OpenTofu / OpenTofu (grafana) (push) Successful in 5s
Lint Governance / BEP Metadata (push) Successful in 0s
Build: Android / Android Rust Core Stub (push) Failing after 23s
Wire Forge-native release infrastructure
2026-06-07 05:51:12 -07:00

46 lines
1.4 KiB
Markdown

# Burrow Grafana API Control Plane
This OpenTofu stack creates Grafana folders and dashboards through the official
`grafana/grafana` provider.
This is not a Grafana deployment mechanism. NixOS owns the Grafana service,
authentication, data sources, and boot-time provisioning.
## Run
Use the repository wrapper so the OpenTofu runtime comes from Nix:
```sh
Scripts/grafana-tofu.sh init -backend-config=backend.hcl
Scripts/grafana-tofu.sh plan -var-file=terraform.tfvars
```
For a local syntax check without remote state:
```sh
Scripts/grafana-tofu.sh init -backend=false
Scripts/grafana-tofu.sh validate
```
Manual Forgejo runs use `.forgejo/workflows/infra-opentofu.yml`. Plan, apply,
and import modes need `GRAFANA_AUTH` or a decrypted admin password so the
Grafana provider can reach the API.
## Adoption
The default stack manages the checked-in dashboards:
```text
services/grafana/dashboards/burrow-overview.json
services/grafana/dashboards/headscale.json
services/grafana/dashboards/observability.json
```
Import existing production objects before enabling apply:
```sh
Scripts/grafana-tofu.sh import 'grafana_folder.folders["burrow"]' 'burrow'
Scripts/grafana-tofu.sh import 'grafana_dashboard.dashboards["burrow-overview"]' 'burrow-overview'
Scripts/grafana-tofu.sh import 'grafana_dashboard.dashboards["burrow-headscale"]' 'burrow-headscale'
Scripts/grafana-tofu.sh import 'grafana_dashboard.dashboards["burrow-observability"]' 'burrow-observability'
```