Closed mapausch closed 4 months ago
according to the Readme "multi-target functionality of this exporter is optional", so I assume I don't need any "?target=..." at the end of the URL... ?
luckily found this PR: https://github.com/prometheus-community/postgres_exporter/pull/1038
Started container with
podman run --net=host -e DATA_SOURCE_URI='pgsql-host:5432/postgres?sslmode=disable' -e DATA_SOURCE_USER=monitoring-user -e DATA_SOURCE_PASS=monitoring-password quay.io/prometheuscommunity/postgres-exporter
and tried to fetch metrics with
curl http://localhost:9187/metrics
(instead of "/probe")
now it seems to work :-)
[...]
pg_database_size_bytes{datname="postgres"} 7.5117027e+07
pg_database_size_bytes{datname="template0"} 7.520783e+06
pg_database_size_bytes{datname="template1"} 7.754211e+06
[...]
What did you do?
user@grafan-host$ podman run --net=host -e DATA_SOURCE_NAME='postgresql://monitoring-user:monitoring-password@pgsql-host:5432/postgres?sslmode=disable' quay.io/prometheuscommunity/postgres-exporter ts=2024-06-24T14:11:32.258Z caller=main.go:86 level=warn msg="Error loading config" err="Error opening config file \"postgres_exporter.yml\": open postgres_exporter.yml: no such file or directory" ts=2024-06-24T14:11:32.258Z caller=proc.go:267 msg="Excluded databases" databases=[] ts=2024-06-24T14:11:32.259Z caller=tls_config.go:274 level=info msg="Listening on" address=[::]:9187 ts=2024-06-24T14:11:32.259Z caller=tls_config.go:277 level=info msg="TLS is disabled." http2=false address=[::]:9187
What did you expect to see? the metrics that postgresql_exporter fetches from database
What did you see instead? Under which circumstances?
Environment
PostgreSQL version:
16
Logs: