STK-64Default Open source
Use Grafana for dashboards
Build dashboards in Grafana, with each dashboard saved as JSON in the repository.
Review by
2027-04-30
How to do it
Grafana reached 1.0 in January 2014. Version 13.2.4 came out on 13 October 2026, with fixes for 13.0 and 13.1 on the same day. The grafana/grafana image has over 5 billion pulls on Docker Hub. Grafana moved from Apache-2.0 to AGPLv3 in April 2021. AGPL only asks you to share changes you make to Grafana itself and offer to others over a network. Running it unchanged for your team adds no duty. It reads Prometheus, Loki, Postgres and OTLP backends. What goes on a dashboard is in Give each service one dashboard. Choose something else when your legal team bans AGPL, and use the dashboards of your managed metrics provider instead.
Examples
YAML example
# provisioning/dashboards/files.yaml
apiVersion: 1
providers:
- name: repository
type: file
options:
path: /etc/grafana/dashboards
Shell example
curl -s -H "Authorization: Bearer $GRAFANA_TOKEN" "https://grafana.example.com/api/search?type=dash-db" \
| jq -r '.[].uid' | sort > live.txt
jq -r '.uid' dashboards/*.json | sort > repo.txt
comm -23 live.txt repo.txt
How to check
Every dashboard in production has a JSON file in the repository, loaded by provisioning. A script compares both lists and finds 0 dashboards that exist only in the UI.
Sources
Related rules
- OPS-16 Give each service one dashboard in Operations and observability
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/stack/operations-tools/grafana">Agent Wranglers software choices playbook</a>. In code you write, add a comment next to it with the same link.