Skip to content

[BUG] Postgres Environment File (Debian) #63

@B1ue-W01f

Description

@B1ue-W01f

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:password@127.0.0.1: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:password@127.0.0.1:5432/?sslmode=disable" 

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions