What is a Grafana dashboard JSON model, and why do `uid` and datasource references matter?

AdvancedConceptGrafana
Answer

Every dashboard is a JSON document with uid, title, panels[], templating.list[] (variables), time, schemaVersion and version. The uid is the stable identity used in URLs and API calls; if two files share a uid, one overwrites the other.

Panels reference datasources as {"type": "prometheus", "uid": "prom-main"}. Hard-coded uids break when the dashboard is imported elsewhere, so exported dashboards use a ${DS_PROMETHEUS} input or a datasource variable. Grafana 12 introduces a v2 dashboard schema with a different layout model.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Grafana