prometheus-postgresql-adapter icon indicating copy to clipboard operation
prometheus-postgresql-adapter copied to clipboard

[Thanos Integration] Implementing other API's

Open iridian-ks opened this issue 5 years ago • 0 comments

Problem

There are other systems/services that might want to query data in a way that's similar to Prometheus, but the API is different. (and therefore doesn't work)

Specifically

Thanos has a Query API, which has implemented proxies for Prometheus, and OpenTSDB. Unfortunately, it doesn't have one for Postgres/Timescale.

What I've Tried

I have a Prometheus/Timescale cluster who has 2 roles:

  1. Monitor Thanos :)
  2. Timescale provides an API for us to do bulk imports, which is something Prometheus doesn't support (This is a huge feature that we are trying to leverage)

We are using Thanos to act as a single endpoint that will consolidate all Prometheus data across all sources. It is working for the most part, but it looks like it isn't triggering the remote_read to get data from Timescale: https://github.com/thanos-io/thanos/issues/1915

Potential Solutions

In Thanos

If Thanos triggered the remote_read in Prometheus then this could work, but looks like they don't want to use Prometheus as a proxy. They recommended that their Thanos API be implemented for Postgres.

Somewhere in the Timescale stack

The Thanos Query API or OpenTSDB API for Timescale would resolve this issue, which would essentially be exactly what this project accomplishes with Prometheus' remote_read implementation, just with a different API. I'm not sure if the OpenTSDB API has been considered by Timescale as that seems the most useful?

(I'm somewhat naive here but any direction would be great)

Many thanks in advance!

iridian-ks avatar Feb 02 '20 18:02 iridian-ks