Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kckecheng/grafana_cli
A CLI based utility to operate Grafana dashboards, folders, annotations, etc.
https://github.com/kckecheng/grafana_cli
grafana monitoring prometheus utility
Last synced: 1 day ago
JSON representation
A CLI based utility to operate Grafana dashboards, folders, annotations, etc.
- Host: GitHub
- URL: https://github.com/kckecheng/grafana_cli
- Owner: kckecheng
- License: apache-2.0
- Created: 2020-12-26T03:06:55.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-01-04T13:58:55.000Z (almost 4 years ago)
- Last Synced: 2024-08-02T15:48:07.680Z (3 months ago)
- Topics: grafana, monitoring, prometheus, utility
- Language: Go
- Homepage:
- Size: 4.9 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
About
=====A CLI based utility to operate Grafana, such as list/export/import/delete dashboards, create/delete/list annotations, etc.
Usage
-----**Build**
::
# Linux
go build
# Compile on Linux for Windows
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build**Provide Grafana Information with CLI Options**
::
./grafana_cli help
./grafana_cli --server http://localhost:3000 --user admin --password admin dashboard list**Provide Grafana Information with Env Vars**
::
export GRAFANA_SERVER='http://localhost:3000'
export GRAFANA_USER='admin'
export GRAFANA_PASSWORD='admin'
./grafana_cli dashboard --help
./grafana_cli dashbaord export --help
./grafana_cli dashboard export --uid 'qpQbDyxMk' --path dashboard1.jsonCoverage
--------Functions as below (which are used for automation during my daily usage) are implemented:
- Annotation: list, create, delete;
- Dashboard: list, export, import, delete, panel (list panels of a dashboard);
- Data Source: list, export, import, delete;
- Folder: list, create, delete;
- Snapshot: list, export, delete.