https://github.com/cirocosta/grafana-sync
  
  
    Keeps your Grafana dashboards in sync 
    https://github.com/cirocosta/grafana-sync
  
grafana
        Last synced: 2 months ago 
        JSON representation
    
Keeps your Grafana dashboards in sync
- Host: GitHub
- URL: https://github.com/cirocosta/grafana-sync
- Owner: cirocosta
- Created: 2018-11-10T03:31:41.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-09-11T13:49:04.000Z (about 5 years ago)
- Last Synced: 2025-05-07T11:18:21.889Z (6 months ago)
- Topics: grafana
- Language: Go
- Homepage: https://ops.tips
- Size: 218 KB
- Stars: 11
- Watchers: 2
- Forks: 6
- Open Issues: 3
- 
            Metadata Files:
            - Readme: README.md
 
Awesome Lists containing this project
README
          ### grafana-sync - Keeps your Grafana dashboards in sync
At each time that it's run, `grafana-sync` gathers information about dashboards from a particular source of truth (a grafana deployment) and then updates the state of the filesystem to reflect such source.
ps.: assumes use of the `folders` feature from grafana 5+
### Usage
```
Usage:
  grafana-sync [OPTIONS]
Application Options:
      --address=      grafana address (default: http://localhost:3000)
      --directory=    directory where dashboards live (default: ./)
  -v, --verbose       displays requests on stderr
Authentication:
  -u, --username=     basic auth username
  -p, --password=     basic auth password
      --access-token= access token to authenticate against grafana
Help Options:
  -h, --help          Show this help message
```
1. Create an API key that is capable of visualizing all dashboards

2. Run `grafana-sync`
```sh
./grafana-sync \
    --verbose \
    --address http://my-instance.com \
    --access-token= \
    --directory=./dashboards
```
Alternatively, you can also use basic auth (if configured):
```sh
./grafana-sync \
    --verbose \
    --address http://my-instance.com \
    --username=admin \
    --password=password \
    --directory=./dashboards
```