Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ryotarai/prometheus-query-proxy
https://github.com/ryotarai/prometheus-query-proxy
Last synced: 9 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/ryotarai/prometheus-query-proxy
- Owner: ryotarai
- Created: 2018-11-27T06:59:58.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-03T07:49:34.000Z (about 6 years ago)
- Last Synced: 2024-11-07T17:58:12.493Z (about 2 months ago)
- Language: Go
- Size: 117 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# prometheus-query-proxy
This works as a reverse proxy in front of multiple Prometheus.
## Installation
```
go get github.com/ryotarai/prometheus-query-proxy
```## Configuration
```yaml
datasources:
- url: "http://localhost:9090"
resolution: '15s' # a.k.a. scrape interval
retention: '360h' # optional
- url: "http://localhost:9091"
resolution: '1m' # a.k.a. scrape interval
retention: '1440h' # optional
```## Endpoints
### `/api/v1/query_range`
A datasource is picked up based on:
```
(Time of now) - (Datasource retention) <= ("start" query param)
AND (Datasource resolution) <= ("step" query param)
```If there are multiple datasources, this selects a datasource whose resolution is the shortest.
### `/api/v1/query`
A datasource is picked up based on:
```
(Time of now) - (Datasource retention) <= ("time" query param)
```If there are multiple datasources, this selects a datasource whose resolution is the shortest.
### `/api/v1/label/KEY/values`
This requests to all datasources and merge them into one response.