Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kobtea/iapetus
Iapetus is a reverse proxy for Prometheus.
https://github.com/kobtea/iapetus
grafana grafana-prometheus prometheus prometheus-proxy
Last synced: about 2 months ago
JSON representation
Iapetus is a reverse proxy for Prometheus.
- Host: GitHub
- URL: https://github.com/kobtea/iapetus
- Owner: kobtea
- License: mit
- Created: 2018-05-01T13:54:10.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-07-12T01:23:16.000Z (over 3 years ago)
- Last Synced: 2024-11-14T13:22:06.586Z (3 months ago)
- Topics: grafana, grafana-prometheus, prometheus, prometheus-proxy
- Language: Go
- Homepage:
- Size: 127 KB
- Stars: 3
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Iapetus
[![CircleCI](https://circleci.com/gh/kobtea/iapetus.svg?style=svg)](https://circleci.com/gh/kobtea/iapetus)
[![Go Report Card](https://goreportcard.com/badge/github.com/kobtea/iapetus)](https://goreportcard.com/report/github.com/kobtea/iapetus)This project is unstable yet.
So breaking change may be happened no notice.## Overview
Iapetus is a reverse proxy for [Prometheus](https://prometheus.io/) that dispatches queries to Prometheus nodes depending on the content of a query, such a label and a timestamp.
Iapetus also supports relabeling feature, so you can configure relabeling rules for each node.
To simplify, Iapetus does not query multiple nodes and aggregate that results. It only does dispatch.## Install
### Binary
Go to https://github.com/kobtea/iapetus/releases
### Building from source
```bash
$ go get -d github.com/kobtea/iapetus
$ cd $GOPATH/src/github.com/kobtea/iapetus
$ make build
```## Usage
```bash
$ iapetus --help
usage: iapetus --config=CONFIG []Flags:
--help Show context-sensitive help (also try --help-long and --help-man).
--config=CONFIG iapetus config file path.
--listen.addr=":19090" address to listen.
--listen.prefix=LISTEN.PREFIX path prefix of this endpoint. remove this prefix when dispatch to a backend.
--log.level=LOG.LEVEL log level (debug, info, warn, error)
--version Show application version.
```configuration format is below.
```yml
# config.yml
log:
# debug, info, warn, error. default is info.
level: info
# Multi clusters are not support yet. So iapetus use 1st cluster setting.
clusters:
- name:
# list prometheus as node
nodes:
- name:
url:
relabels:
# support relabelling rules at prometheus
[ - ... ]
min_step:
# proxy rules
# each rule are pair of `target: ` and some rule.
# support rules are below.
# - default: , use when no match other rules
# - start: , compare `start` at request parameter
# - end: , compare `end` at request parameter
# - range: , range is between `start` and `end` at request parameter
# - required_labels: [ : ... ], find labels from `query` or `match[]` parameter(s). If a request satisfy this rule, Iapetus send not matched metrics but whole query send to the target. It is mean that Iapetus does not calculate values.
rules:
[ - , ...]
```sample
```yml
log:
level: info
clusters:
- name: cluster1
nodes:
- name: primary
url: http://localhost:9090
- name: archive
url: http://localhost:9091
relabels:
- source_labels: [__name__]
target_label: __name__
replacement: ${1}_avg
min_step: 10m
rules:
- target: primary
default: true
- target: archive
range: "> 1d"
- target: archive
start: "< now-1d"
```## Roadmap
### Cluster
Handling multi prometheus clusters.
Proxy rule is TBD.
It may be a same rule as node, (or not).## License
MIT