Open akamensky opened 4 years ago
@akamensky Is this the same issue as https://github.com/wrouesnel/postgres_exporter/issues/293 ?
@frittentheke not exactly, this is about the timing it needs to fail. 6 seconds per each existing database is a bit too much, we are trying to pull data every 10 seconds, while EVERY request takes about 3 minutes because of number of different databases this instance contains.
I am facing similar issues. With auto-discovery enabled everything is very slow.
I am seeing log messages which I think are indicating that prometheus closes connections already while results are still being calculated:
http: multiple response.WriteHeader calls
Also liveness issues on k8s are occurring when auto-discovery is enabled.
Without auto-discovery everything works fine but without that multiple databases are not supported.
Details:
Steps:
DATA_SOURCE_NAME="user=postgres host=/var/run/postgresql database=postgres sslmode=disable"
and using local queriesExpected outcome:
Auto-discovery finds all databases and can connect to them, every refresh of metrics page from exporter is "instantaneous"
Actual outcome:
Startup always delayed by
num_of_dbs * 6
seconds. Every refresh of metrics page takes exactlynum_of_dbs * 6
seconds. exporter is FAILING to connect to all discovered DBs.NOTE:
I already gave it unrestricted superuser access and it is still FAILING to connect to DBs? No, I am not going to use md5 auth over TCP sockets, I want to use ident running locally from restricted user, however appears ident even when using superuser is not working properly.