Serialization
The grafana lexicon writes Grafana’s own files, keyed by path under the
directory of the -o output:
dashboards/<uid>.json, ordashboards/<folder>/<uid>.jsonfor a dashboard with afolder: the dashboard JSON, one file per dashboard.provisioning/datasources/chant.yaml: every declared datasource.provisioning/dashboards/chant.yaml: a file provider for the dashboards directory; a default one unless aDashboardProvideris declared.provisioning/alerting/chant.yaml: rule groups, contact points, the notification policy tree, mute timings and templates, when the build declares any.
The primary output (the -o file itself) is a JSON index of the dashboards,
datasources, alerting and files that were built.
- Dashboard JSON carries the pinned schema’s
schemaVersion, no numericid, and every field Grafana’s schema requires (link defaults, an emptyannotations.list,fieldConfig.overrides). - Panels without a position are laid out in declaration order on the 24-column
grid. Ids and query
refIds are assigned in order unless set. - A declared
Datasourceis written as{ type, uid }wherever it is referenced, and as its uid inside another datasource’sjsonData. chant buildrewrites JSON files with sorted keys; Grafana does not care about key order.- The dashboard JSON carries no ownership marker. Grafana keeps who manages a
dashboard in the resource’s metadata on its
dashboard.grafana.appAPI, not in the JSON: for a provisioned dashboard, the name of the provider that loaded it, which ischantunless aDashboardProvidernames another.chant lifecycle diff --livereads that back (see Drift and Live Export).