timescale/prometheus-postgresql-adapter

-pg.use-timescaledb doesn't seems to work

aliensmily opened this issue · 1 comments

Hi,

when i try to use the adapter without TimescaleDB, it demands it anyway.

postgres@somehost:/data/prometheus-postgresql-adapter-0.2$ ./prometheus-postgresql-adapter -pg.database prometheusdb -pg.user prometheus -pg.use-timescaledb false
level=info ts=2018-06-27T08:43:58.53972208Z caller=client.go:80 msg="host=localhost port=5432 user=prometheus dbname=prometheusdb password='' sslmode=disable connect_timeout=10"
level=info ts=2018-06-27T08:43:58.546982528Z caller=client.go:125 storage=PostgreSQL msg="Could not enable TimescaleDB extension" err="pq: could not open extension control file \"/usr/share/postgresql/10/extension/timescaledb.control\": No such file or directory"
level=error ts=2018-06-27T08:43:58.547422322Z caller=client.go:99 err="pq: current transaction is aborted, commands ignored until end of transaction block"

postgres@somehost:/data/prometheus-postgresql-adapter-0.2$ ./prometheus-postgresql-adapter -pg.database prometheusdb -pg.user prometheus
level=info ts=2018-06-27T09:02:44.996237366Z caller=client.go:80 msg="host=localhost port=5432 user=prometheus dbname=prometheusdb password='' sslmode=disable connect_timeout=10"
level=info ts=2018-06-27T09:02:45.001604523Z caller=client.go:125 storage=PostgreSQL msg="Could not enable TimescaleDB extension" err="pq: could not open extension control file \"/usr/share/postgresql/10/extension/timescaledb.control\": No such file or directory"
level=error ts=2018-06-27T09:02:45.002073409Z caller=client.go:99 err="pq: current transaction is aborted, commands ignored until end of transaction block" 

It seems the package needs to be installed anyway?

Hi @aliensmily ,
You should supply boolean arguments like -arg=true/false, so -pg.use-timescaledb=false