Open keshav1git opened 5 years ago
You can either make queries in Prometheus using PromQL (the adapter handles pulling extra data from pg_prometheus
to Prometheus, if necessary), or you can make queries in SQL directly on pg_prometheus
using a tool like psql
. Does that help?
@spolcyn It only works on write . But when do some PromQL, I can`t find any read query in prometheus_postgresql_adapter. Is there a mistake in setting it? Both of them were in the docker
remote_write:
- url: "http://prometheus_postgresql_adapter:9201/write"
remote_read:
- url: "http://prometheus_postgresql_adapter:9201/read"
To confirm, you see data in pg_prometheus
that you can query locally using SQL, but when you use the Prometheus web interface and PromQL, no results come up?
So I think I can help here... You can query your metrics in the TimescaleDB instance using standard SQL and connecting to PostgreSQL host where you have both the pg_prometheus extension running and timescaledb the data is forwarded to the timescale instance through the adapter, making the data available in the PostgreSQL database, this would be your long term storage. If you wanted to run a PromQL query you would run that against the Prometheus server (by default this server will retain 15 days of data). Let us know if that helps?
reference : link