Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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 (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-09-11T13:49:04.000Z (over 4 years ago)
- Last Synced: 2024-10-03T16:45:31.778Z (3 months ago)
- Topics: grafana
- Language: Go
- Homepage: https://ops.tips
- Size: 218 KB
- Stars: 11
- Watchers: 3
- 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 stderrAuthentication:
-u, --username= basic auth username
-p, --password= basic auth password
--access-token= access token to authenticate against grafanaHelp Options:
-h, --help Show this help message
```1. Create an API key that is capable of visualizing all dashboards
![API Key creation](./assets/create-api-key.png)
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
```