From 76dc7932a405e7762fac33e01a60dbd9eb838379 Mon Sep 17 00:00:00 2001 From: bergquist <carl.bergquist@gmail.com> Date: Fri, 2 Feb 2018 16:14:48 +0100 Subject: [PATCH] docs: describe uid for dashboard provisioning --- conf/provisioning/dashboards/sample.yaml | 2 +- docs/sources/administration/provisioning.md | 8 ++++++-- .../dashboards/test-configs/broken-configs/commented.yaml | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/conf/provisioning/dashboards/sample.yaml b/conf/provisioning/dashboards/sample.yaml index 40992d1461e..f0dcca9b47a 100644 --- a/conf/provisioning/dashboards/sample.yaml +++ b/conf/provisioning/dashboards/sample.yaml @@ -3,4 +3,4 @@ # folder: '' # type: file # options: -# folder: /var/lib/grafana/dashboards \ No newline at end of file +# path: /var/lib/grafana/dashboards diff --git a/docs/sources/administration/provisioning.md b/docs/sources/administration/provisioning.md index c3595969281..b499efba1e1 100644 --- a/docs/sources/administration/provisioning.md +++ b/docs/sources/administration/provisioning.md @@ -179,7 +179,11 @@ The dashboard provider config file looks somewhat like this: folder: '' type: file options: - folder: /var/lib/grafana/dashboards + path: /var/lib/grafana/dashboards ``` -When Grafana starts, it will update/insert all dashboards available in the configured folders. If you modify the file, the dashboard will also be updated. +When Grafana starts, it will update/insert all dashboards available in the configured path. Then later on poll that path and look for updated json files and insert those update/insert those into the database. + +### Reuseable dashboard urls + +If the dashboard in the json file contains an [uid](http://localhost:3004/reference/dashboard/#json-fields), Grafana will force insert/update on that uid. This allows you to migrate dashboards betweens Grafana instances and provisioning Grafana from configuration without breaking the urls given since the new dashboard url uses the uid as identifer. diff --git a/pkg/services/provisioning/dashboards/test-configs/broken-configs/commented.yaml b/pkg/services/provisioning/dashboards/test-configs/broken-configs/commented.yaml index e40612af508..f0dcca9b47a 100644 --- a/pkg/services/provisioning/dashboards/test-configs/broken-configs/commented.yaml +++ b/pkg/services/provisioning/dashboards/test-configs/broken-configs/commented.yaml @@ -3,4 +3,4 @@ # folder: '' # type: file # options: -# folder: /var/lib/grafana/dashboards +# path: /var/lib/grafana/dashboards