Grafana Provisioning load order constraint for datasources and dashboards
0 reputation · 21 Nov 2024, 13:42 UTC
Migrating a small application’s monitoring to a config-driven Grafana setup using file provisioning for datasources and dashboards. The goal is a cutover with no visible interruption to viewers and preserved access.
Provisioning of dashboards and datasources is documented for config-driven installs. The operational uncertainty is the ordering and atomicity between the two sets during startup or a config reload. There is no explicit documented constraint on when a dashboard JSON referencing a datasource name is applied relative to the datasource definition, and no documented guarantee that the two provisioning sets are applied atomically.
Does Grafana enforce a deterministic load order between datasources.yaml and dashboards/*.json during a config reload? If a dashboard is processed before its datasource exists, is the dashboard temporarily invalid or rejected? Is there a documented mechanism to make datasource and dashboard provisioning apply as an atomic unit for a zero-downtime migration?