|
|
|
@ -1,14 +1,20 @@
|
|
|
|
|
# tsdb-kit |
|
|
|
|
|
|
|
|
|
Node.js library and CLI-tool for querying timeseries-datasources from backend directly or using Grafana as proxy. |
|
|
|
|
TSDB-kit is a node.js library and CLI-tool for querying timeseries-datasources. |
|
|
|
|
|
|
|
|
|
User gets a unified interface to all datasources. Library gives single output format: fields order, time units, etc. |
|
|
|
|
## Features |
|
|
|
|
|
|
|
|
|
## Supported direct datasources |
|
|
|
|
- can query datasources directly or using Grafana as proxy |
|
|
|
|
- can be used as a lib from your node.js-code or as a CLI-tool |
|
|
|
|
- user gets a unified interface to all datasources. Library gives single output format: fields order, time units, etc. |
|
|
|
|
|
|
|
|
|
* Prometheus |
|
|
|
|
## Supported datasources |
|
|
|
|
|
|
|
|
|
### Direct |
|
|
|
|
|
|
|
|
|
## Supported Grafana datasources |
|
|
|
|
* Prometheus (limited, auth is not supported yet) |
|
|
|
|
|
|
|
|
|
### Grafana |
|
|
|
|
|
|
|
|
|
* Influxdb |
|
|
|
|
* Graphite |
|
|
|
@ -18,13 +24,20 @@ User gets a unified interface to all datasources. Library gives single output fo
|
|
|
|
|
|
|
|
|
|
Please write us at ping@corpglory.com if you want your datasource to be supported |
|
|
|
|
|
|
|
|
|
## CLI usage |
|
|
|
|
## Usage |
|
|
|
|
|
|
|
|
|
### Lib (TODO) |
|
|
|
|
|
|
|
|
|
### CLI |
|
|
|
|
|
|
|
|
|
For now, CLI supports only direct Prometheus queries |
|
|
|
|
|
|
|
|
|
For example: |
|
|
|
|
|
|
|
|
|
For now, CLI supports only direct Prometheus queries without auth |
|
|
|
|
`npx @corpglory/tsdb-kit -u http://localhost:9090 -q '100-(avg by (instance) (irate(node_cpu_seconds_total{mode="idle"}[5m])) * 100)'` |
|
|
|
|
|
|
|
|
|
Example: |
|
|
|
|
|
|
|
|
|
`npx tsdb-kit -u http://localhost:9090 -q '100-(avg by (instance) (irate(node_cpu_seconds_total{mode="idle"}[5m])) * 100)'` |
|
|
|
|
## Development (TODO) |
|
|
|
|
|
|
|
|
|
## Projects based on library |
|
|
|
|
* [grafana-data-exporter](https://github.com/CorpGlory/grafana-data-exporter) |
|
|
|
|