Skip to content

Configuration via environment variables not working? #264

@micheljung

Description

@micheljung
# Verify environment variables
$ docker inspect psql-db-exporter | grep PG_
                "PG_EXPORTER_DISABLE_DEFAULT_METRICS=true",
                "PG_EXPORTER_DISABLE_SETTINGS_METRICS=true",
                "PG_EXPORTER_EXTEND_QUERY_PATH=/queries.yaml",

# Verify that queries.yaml is mounted correctly
$ docker inspect psql-db-exporter | grep -A 2 Binds
            "Binds": [
                "/mypath/queries.yaml:/queries.yaml:rw"
            ],

# Check queries.yaml
$ cat queries.yaml
<exact content of the sample file in this repository>

# Expect no "pg_settings", but get 582
$ docker run --rm --network="default" appropriate/curl -s http://psql-db-exporter:9187/metrics | grep pg_settings | wc -l
582

# Expect some "user_tables" results, but get 0
$ docker run --rm --network="default" appropriate/curl -s http://psql-db-exporter:9187/metrics | grep user_tables | wc -l
0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions