Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/grafana-tools/grafana-info
[ON HOLD] Displays brief info about Grafana objects on the terminal.
https://github.com/grafana-tools/grafana-info
cli grafana http json tools
Last synced: 23 days ago
JSON representation
[ON HOLD] Displays brief info about Grafana objects on the terminal.
- Host: GitHub
- URL: https://github.com/grafana-tools/grafana-info
- Owner: grafana-tools
- License: gpl-3.0
- Created: 2016-11-20T00:21:20.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2016-11-28T23:58:33.000Z (almost 8 years ago)
- Last Synced: 2024-10-01T15:15:10.818Z (about 1 month ago)
- Topics: cli, grafana, http, json, tools
- Language: Go
- Homepage:
- Size: 19.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [WIP] grafana-info
*It is just draft with basic functions.*
Displays on the terminal a brief info about Grafana objects.
It can be useful when you have a lot of backups from Grafana in JSON-files.
Utility will help you find for example a right dashboard by tag or panel name.The code based on [autograf](https://github.com/grafov/autograf) library.
Planned features:
* treats input as JSON and parse it for Grafana objects
* recognize dashboards, datasources, users
* get a bunch objects at once (from files or stdin)
* show brief info about each succesfully parsed object
* output important fields in key=value format (for easy grepping)Usage example:
$ grafana-info < myfile.json
Example output:
=== Dashboard <175980> "Example API" ===
Tags: [autogenerated] [example] [dev]
Templating Vars: [env] [database] [datasource]
--- Row New row ---
| MAX DB response time | Max per handler time |
| singlestat | singlestat |
--- Row Information By Hosts ---
| Handler Max AVG [1min] r | DB Max AVG[1min] resp |
| graph | graph |
--- Row Handlers Response Time ---
| Top handlers response ti | Top handlers response | Handler RPS |
| graph | graph | table |
--- Row DB ---
| DB Top Query Duration | Top Hits Queries coun | AVG Response Time by db |
| graph | graph | |Or for conjunction with `grep`:
$ grafana-info --keys *.json
id: 175980
175980.slug: example-api
example-api.175980.dashboard: Example API
example-api.175980.tag: autogenerated
example-api.175980.tag: example
example-api.175980.tag: dev
example-api.175980.templating: env
example-api.175980.templating: datasource
example-api.175980.row: New row
example-api.175980.panel: MAX DB response time
example-api.175980.type: singlestatSo you easily can find slug and ID of the dashboard:
$ grafana-info --keys *.json | grep tag: "(dev|staging)"
example-api.175980.tag: devFuture usage examples:
$ grafana-info path/to/backups/*.json
$ for f in *json; do cat $f; done | grafana-info --color