This repository was archived by the owner on Dec 17, 2024. It is now read-only.

Description
When we use together
- adhoc mode
- dbtype - postgres-continuous-discovery
- adhoc_conn_string
env:
...
- name: PW2_DATASTORE
value: prometheus
- name: PW2_ADHOC_DBTYPE
value: postgres-continuous-discovery
- name: PW2_ADHOC_NAME
value: adhoc
- name: PW2_ADHOC_CONFIG
value: unprivileged
- name: PW2_ADHOC_CONN_STR
value: postgresql://user:password@localhost:5432/postgres
databases are discovered, but metrics cannot be scraped from them due to missing credentials. They're not propagated from PW2_ADHOC_CONN_STR.
In logs we can see something like
2023/01/13 11:34:20 INFO DBGetPGVersion: [adhoc_example2_db] DBGetPGVersion failed, using old cached value. err: dial tcp: lookup port=: no such host
2023/01/13 11:34:20 INFO DBGetPGVersion: [adhoc_exampl1e_db] DBGetPGVersion failed, using old cached value. err: dial tcp: lookup port=: no such host
That happens due'to no explicit credentials setting here