Skip to content

shell scripts for importing and exporting Grafana's dashboards

Notifications You must be signed in to change notification settings

pschuermann/grafana-import-export

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

grafana-import-export

Simple scripts to export from, and import dashboards to Grafana

Example was taken from https://gist.github.com/crisidev/bd52bdcc7f029be2f295

Dependencies

JQ - to process .json

dashboard-exporter

To make it work, you need to replace KEY, HOST and FILE_DIR variables with your own

Do not forget to set permissions before run

chmod 755 dashboard-exporter.sh

Then run:

./dashboard-exporter.sh

Expected output:

./dashboard-exporter.sh
  % 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 at FILE_DIR path

dashboard-importer

To make it work, you need to replace KEY, HOST and FILE_DIR variables with your own

Do not forget to set permissions before run

chmod 755 dashboard-importer.sh

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

./dashboard-importer.sh

To import only some of them:

./dashboard-importer.sh dashboard1.json dashboard2.json

About

shell scripts for importing and exporting Grafana's dashboards

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%