Skip to content

A proxy to fan out a single request to multiple prometheus servers and merge the responses

Notifications You must be signed in to change notification settings

swalberg/promproxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project is not being maintained

It works, but I've found Promxy which handles more edge cases than this, so I've moved to that. You should, too!

PromProxy

A daemon that receives Prometheus API calls from a system such as Grafana, sends that request to multiple Prometheus instances, and aggregates the responses.

Systems like Grafana don't work well when your data is split up across multiple non overlapping Prometheus servers. This daemon attempts to trick the requester into thinking that there is just one server, but the requests to go many.

Getting started

Building

Before starting, you should have installed go and ensure that your $GOPATH environment variable is also set.

Get the source code

$ go get https://github.com/swalberg/promproxy

Build the app

$ cd $GOPATH/src/github.com/swalberg/promproxy
$ make

Upon success, you will have the binary named app in your current directory

Running

Launching

At this time, there are limited configuration options, so running the app is simple.

Launch it with an array of Prometheus servers as arguments

$ ./app http://192.168.0.20:9090 http://192.168.0.30:9090 http://192.168.0.40:9090

Testing

Once running, the app will be listening at http://0.0.0.0:6379

Perform a test query against the label endpoint

$ curl http://localhost:6789/api/v1/label/job/values
{"status":"success","data":["prometheus"]}

Grafana

After promproxy is running, setup (or change) your Prometheus data source in Grafana to point to promproxy instead of a prometheus server.

API Limitations

Currently, only the following endpoints of the Prometheus API are supported:

  • label
  • series
  • query_range

These endpoints should provide sufficient functionality for building dashboards in Grafana

About

A proxy to fan out a single request to multiple prometheus servers and merge the responses

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published