What did you do?
Install/Upgrade to 0.12.0
Tried to add --config.file='' and --config.file='false' to disable the config file feature but it keeps trying to read the config file.
Also a default of 'postgres_exporter.yml' doesn't really specify where this file should be located.
What did you expect to see?
No errors in the logs
What did you see instead? Under which circumstances?
Error in the logs
caller=main.go:86 level=error msg="Error loading config" err="Error opening config file \"postgres_exporter.yml\": open postgres_exporter.yml: no such file or directory"
Environment
Linux 3.10.0-1160.88.1.el7.x86_64 x86_64
- postgres_exporter version:
# postgres_exporter --version
postgres_exporter, version 0.12.0 (branch: HEAD, revision: f9a1edbbc6d629663aa658378e1d989293e6e488)
build user: root@463311dfdfb6
build date: 20230321-23:52:03
go version: go1.20.2
platform: linux/amd64
tags: netgo static_build
Contents of Defaults file:
### Managed by SaltStack
DATA_SOURCE_NAME=postgresql://postgres_exporter:********@127.0.0.1:5432/postgres?sslmode=disable
PG_EXPORTER_WEB_LISTEN_ADDRESS=:9187
PG_EXPORTER_DISABLE_DEFAULT_METRICS=false
PG_EXPORTER_DISABLE_SETTINGS_METRICS=false
PG_EXPORTER_EXTEND_QUERY_PATH=/usr/share/prometheus/queries.yaml
PG_EXPORTER_AUTO_DISOVER_DATABASES=true
PG_EXPORTER_EXCLUDE_DATABASES=template0,template1
POSTGRES_EXPORTER_OPTS="--extend.query-path=/usr/share/prometheus/queries.yaml --web.listen-address=:9187"
### EOF ###
not relevant
What did you do?
Install/Upgrade to 0.12.0
Tried to add
--config.file=''and--config.file='false'to disable the config file feature but it keeps trying to read the config file.Also a default of 'postgres_exporter.yml' doesn't really specify where this file should be located.
What did you expect to see?
No errors in the logs
What did you see instead? Under which circumstances?
Error in the logs
Environment
Linux 3.10.0-1160.88.1.el7.x86_64 x86_64Contents of Defaults file:
not relevant