Save a dashboard to Git
Saving a new dashboard opens the Save dashboard drawer. You name the dashboard, choose a Git Sync provisioned folder, then set the branch, filename, and commit comment so Grafana can push the dashboard JSON to your repository.
To save a dashboard to Git, complete the following steps:
In this section, you save the dashboard to a provisioned folder and commit it to main.
Click Save in the dashboard toolbar.
In the Title field, enter a descriptive name for the dashboard.
For example, enter
HTTP Request Monitoring.In the Description field, enter a brief explanation of the dashboard’s purpose.
For example, enter
Monitors HTTP request rates and error rates for web services.In Folder, select your Git Sync provisioned folder (it shows a Provisioned label).
After you select it, the drawer shows Git Sync fields such as Branch and Filename.
After the Git Sync fields appear, in the Branch field, enter
mainto commit directly to the main branch.In later milestones, you’ll use a new branch name to open a pull request instead.
Optionally, in Repository folder, enter a subdirectory inside the repository.
For example, enter dashboards. Leave empty to save at the repository root.
In the Filename field, enter the dashboard file name.
For example, enter
http-monitoring.json.In the Comment field, enter a commit message describing the new dashboard.
For example, enter
Add HTTP request monitoring dashboard.In the Provisioned dashboard drawer, scroll to the bottom if needed, then click Save.
The dashboard is saved to the Git Sync provisioned folder and committed to the GitHub repository. With Branch set to main, Git Sync pushes a direct commit. The dashboard is now version controlled and synced with GitHub.
In the next milestone, you’ll learn how to edit an existing synced dashboard.