timescale / prometheus-postgresql-adapter

Use PostgreSQL as a remote storage database for Prometheus
Apache License 2.0
335 stars 66 forks source link

no docs about how adapter work #93

Closed daixiang0 closed 3 years ago

daixiang0 commented 4 years ago

Hi, i want to install prometheus with HA and i want to use remote RW.

This adapter is cool but i have some question about it:

  1. how adapter work?

It seems based on pg_prometheus, so does it mean what adapter does is to convert metrics to format that PG uses?

  1. can adapter support multi-prometheus-instance? if so, how to ensure it does not send duplicate data to PG?

for example, there instance use adapter to connect PG, the start time of those instance is different, each of them scrape data with different timestamp, even with 1ms difference, there are three data, can adapter merge or do sometheing to make them into one data? If not, PG would store almost same data with three times.

Or, PG can do this? But i look pg_prometheus, it use time DB, which mean different timestamp means different data.