Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v1.10.0-beta3] Adhoc and postgres-continuous-discovery not work together. Credentials are missing #584

Closed
chromko opened this issue Jan 13, 2023 · 0 comments · Fixed by #585
Labels

Comments

@chromko
Copy link

chromko commented Jan 13, 2023

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

@chromko chromko changed the title [v1.10.0-beta3] Adhoc and postgres-continuous-discovery not working together. Credentials are missing [v1.10.0-beta3] Adhoc and postgres-continuous-discovery not work together. Credentials are missing Jan 26, 2023
@pashagolub pashagolub added the bug label Feb 8, 2023
pashagolub added a commit that referenced this issue Mar 6, 2023
[-] fix connection string parsing for postgres-continuous-discovery, closes #584
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants