Skip to content
shell scripts for importing and exporting Grafana's dashboards and datasources
Branch: master
Clone or download
hagen1778 Merge pull request #6 from morganchristiansson/refactor-importer-and-…

Refactor exporter and retrying failed creates as update
Latest commit 4428e5d Mar 24, 2018


Simple scripts for import/export dashboards, datasources and alerts to Grafana

Support organizations.

Example was taken from


JQ - to process .json


Replace HOST and FILE_DIR variables at with your own. Also fill ORGS array with pairs ORGANIZATION:API_KEY.




Expected output:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 21102    0 21102    0     0  53000      0 --:--:-- --:--:-- --:--:-- 53020

Look for exported .json dashboards and datasources at FILE_DIR path


To import all .json files from FILE_DIR to your Grafana:


To import only some of them:

./ organization/dashboards/dashboard.json organization/datasources/datasource.json

To import all for organization:

./ organization/dashboards/*.json organization/datasources/*.json
You can’t perform that action at this time.