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

[BUG] Postgres Environment File (Debian) #63

Open
B1ue-W01f opened this issue Jun 29, 2021 · 1 comment
Open

[BUG] Postgres Environment File (Debian) #63

B1ue-W01f opened this issue Jun 29, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@B1ue-W01f
Copy link

Your setup

Formula commit hash / release tag

n/a

Versions reports (master & minion)

n/a

Pillar / config used

prometheus:
  wanted:
    component:
      # List components (ie, exporters) using underscores and
      # removing the 'prometheus' prefix
      - postgres_exporter
  pkg:
    component:
      postgres_exporter:
        environ_file: /etc/default/prometheus-postgres-exporter
        environ:
          environ_arg_name: ARGS
          args:
            DATA_SOURCE_NAME: exporter:[email protected]:5432/?sslmode=disable

Bug details

Describe the bug

On debian at least, the postgres exporter requires no ARGS header at the start of the environment variables file.

Steps to reproduce the bug

n/a

Expected behaviour

The formula should implement the exporter and allow config of the environment variables.

Attempts to fix the bug

Enclosing the variables in "" appears to be acceptable but the ARGS= needs to be removed, potential fix would be to have the name default to blank and include the '=' if one is provided. Resulting in a file such as below if none give:

"DATA_SOURCE_NAME: exporter:[email protected]:5432/?sslmode=disable" 
@B1ue-W01f B1ue-W01f added the bug Something isn't working label Jun 29, 2021
@B1ue-W01f
Copy link
Author

Additionally the format:

DATA_SOURCE_NAME="user=x password=x host=/var/run/postgresql/ database=x sslmode=disable" ARGS=""

Is compliant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant