A Grafana backend plugin for automatic synchronization of dashboard between multiple Grafana instances.
This plugin can be used to synchronize dashboards via a Git repository.
A possible use case is: One Grafana instance is using the plugin to push dashboards to a Git repository,
another Grafana instance is using it to pull the dashboards.
As an example this is useful to stage dashboards from "dev" to "prod" environments.
A data source backend plugin consists of both frontend and backend components.
-
Install dependencies
yarn install
-
Build plugin in development mode or run in watch mode
yarn dev
or
yarn watch
-
Build plugin in production mode
yarn build
-
Update Grafana plugin SDK for Go dependency to the latest minor version:
go get -u github.com/grafana/grafana-plugin-sdk-go go mod tidy
-
Build backend plugin binaries for Linux, Windows and Darwin:
mage -v
-
List all available Mage targets for additional commands:
mage -l
Set environment variables
PLUGIN_REPO = local path to cloned repo
GIT_SSH_KEY = path to private git sshkey
Build frontend and backend and start docker-compose
docker-compose up
Under datasources the Grafana Dashboard Plugin Sync should be available now
The release process of the plugin is automated using Github Actions.
On each push to the main
branch, a new prerelease is created and the corresponding commit is tagged "latest".
Old prereleases will be deleted.
To create a normal release, the commit that is used as the basis for the release must be tagged with the following format: v*.*.*
.
After that, the release is built and created with the version number extracted from the tag.
Furthermore, a new commit is created, which sets the current version in the main
branch to the version that has been released.
- Build a data source backend plugin tutorial
- Grafana documentation
- Grafana Tutorials - Grafana Tutorials are step-by-step guides that help you make the most of Grafana
- Grafana UI Library - UI components to help you build interfaces using Grafana Design System
- Grafana plugin SDK for Go