Simple tool to migrate Grafana dashboards from one Grafana instance to another. It uses the Grafana API to export and import dashboards.
This will clean panel ids, and then copy all panels and alerts. It will create the folder to the destination Grafana instance if it does not exist.
For example: from dev to staging, from staging to prod;
⚠ Requires exact dashboard name for now.
npm install
- Copy
.env.template
file to.env
and Fill it with the source and destination Grafana URLs and API keys and alerts if needed npm run build
npm run grafana-migration -- --source <source-env> --destination <destination-env> --name <dashboard-name>
- Example:
npm run grafana-migration -- --source qa --destination stage --name "My Beautiful Dashboard"
- You can use anoher env file by passing the parameter
-e
or--env
:-e "./anotherenvfile"
npm install -g grafana-migrations
grafana-migration --source qa --destination stage --name "My Beautiful Dashboard" -e '.env'