Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alantang888/grafana-dashboard-backup
https://github.com/alantang888/grafana-dashboard-backup
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/alantang888/grafana-dashboard-backup
- Owner: alantang888
- Created: 2022-02-18T11:32:09.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-02-09T13:59:56.000Z (almost 2 years ago)
- Last Synced: 2024-11-11T01:05:00.119Z (2 months ago)
- Language: Go
- Size: 34.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Grafana Dashboard Backup to Git
Export grafana dashboard, alert rule then commit to Git repo.Since dashboard title can change. And that sill the same dashboard. So the file structure use `PERFIX/UID/TITLE.json`.
Alert rule structure use `ALERTRULE_NAMESPACE/ALERTRULE_GROUP.json`.
If multiple rule using same alert group. They will store in same file.Environment variables:
- `GIT_REPO_URL`: Git repo. Current only using HTTP. Not SSH (Just lazy to set SSH keys...)
- `GIT_USER`: Git username for basic auth
- `GIT_PASSWD`: Git password for basic auth
- `GIT_AUTHOR`: Git author (default: "NO BODY")
- `GIT_AUTHOR_EMAIL`: Git author email (default: "[email protected]")
- `DIR_PREFIX`: Dashboard directory prefix on git repo
- `ALERT_RULE_DIR_PREFIX`: Alert rule directory prefix on git repo
- `GRAFANA_URL`: Grafana URL
- `GRAFANA_TOKEN`: Grafana API token. It just need viewer permission
- `PUSH_GATEWAY_URL`: Prometheus pushgate URL
- `PUSH_JOB_NAME`: Prometheus job name. (Default will set to `grafana_export`)