8.07 Provision - MartinWong06/grafana GitHub Wiki

Provisioning Grafana using config files allows for a more natural GitOps approach, as data sources and dashboards can be defined via files that can be version controlled."

Certain object require Grafana API to query, you may refer https://grafana.com/docs/grafana/latest/administration/api-keys/

  1. Enable provisioning in the Grafana config file.

  2. Edit the YAML file located in the provisioning directory. Dashboard Example: link to the example

  3. Export the dashboard from the existing instance using the export functionality, copy the JSON, and save it into a file.

  4. Based on the configuration in the dashboard provisioning config file, copy the JSON file to the designated directory.

  5. Restart the Grafana instance. If the configuration is incorrect, the instance will be unable to start up.