浏览代码

docs: describe uid for dashboard provisioning

bergquist 8 年之前
父节点
当前提交
76dc7932a4

+ 1 - 1
conf/provisioning/dashboards/sample.yaml

@@ -3,4 +3,4 @@
 #   folder: ''
 #   folder: ''
 #   type: file
 #   type: file
 #   options:
 #   options:
-#     folder: /var/lib/grafana/dashboards
+#     path: /var/lib/grafana/dashboards

+ 6 - 2
docs/sources/administration/provisioning.md

@@ -179,7 +179,11 @@ The dashboard provider config file looks somewhat like this:
   folder: ''
   folder: ''
   type: file
   type: file
   options:
   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.

+ 1 - 1
pkg/services/provisioning/dashboards/test-configs/broken-configs/commented.yaml

@@ -3,4 +3,4 @@
 #   folder: ''
 #   folder: ''
 #   type: file
 #   type: file
 #   options:
 #   options:
-#     folder: /var/lib/grafana/dashboards
+#     path: /var/lib/grafana/dashboards