timescale / prometheus-postgresql-adapter

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

connecting prometheus adapter to azure timescale #76

Open ssube opened 5 years ago

ssube commented 5 years ago

I'm trying to set up an Azure Database for PostgreSQL instance, hoping to use their replication and PITR features, and send metrics to it from a few different Prometheus instances. Previously, I had a single Timescale pod running and consuming metrics correctly, but the pg_prometheus extension doesn't seem to be available on Azure:

level=info ts=2019-05-01T21:14:38.588458149Z caller=log.go:25 msg="host=example-timescale-test.postgres.database.azure.com port=5432 user='username' dbname=staging password='password' sslmode=require connect_timeout=10"
level=error ts=2019-05-01T21:14:39.24436137Z caller=log.go:33 err="pq:  extension \"pg_prometheus\" is not supported by Azure Database for PostgreSQL"

This adapter seems to require that extension, even when inserting normalized metrics. Is that the case, or am I missing a flag? If so, is there a known/documented way of attaching Prometheus and Azure's Timescale?

ByteCommander commented 5 years ago

I would love to do the same and use Azure Postgres for storing metrics, but so far I was unable to find a way. Hope to hear any solutions, but I guess probably it's not possible without Azure supporting that pg extension.

ssube commented 5 years ago

The pg_prometheus extension was the first issue, but the hard-coded CREATE EXTENSION calls (which requires the adapter to have SUPERUSER privileges) lead me to put together a small, generic SQL adapter based on the Prometheus remote storage example and this Timescale adapter: https://github.com/ssube/prometheus-sql-adapter

I hope to merge those changes back to this project, specifically not always creating a schema, but have been side-tracked using the metrics. :)

bboule commented 5 years ago

@ByteCommander by way of an update, we are actively engaged in looking at how to make this work, hope to have an update in a few weeks as we work out what the options look like. Stay Tuned :)

noltej commented 3 years ago

@ByteCommander by way of an update, we are actively engaged in looking at how to make this work, hope to have an update in a few weeks as we work out what the options look like. Stay Tuned :)

@bboule Any progress on this?