Open
Description
postgres_exporter start command:
docker run --net=host -d --restart=always --name=postgres-exporter -e DATA_SOURCE_NAME="postgresql://postgres_exporter:admin123456@10.41.32.33:5432/phecda-cm?sslmode=disable" -v /tmp/default_pg_20240410.yaml:/tmp/default_pg_20240410.yaml repo.cicc.com.cn/public-docker-virtual/prometheuscommunity/postgres-exporter:v0.11.1 --extend.query-path=/tmp/default_pg_20240410.yaml
postgres_exporter log only print:
ts=2025-03-06T00:44:38.390Z caller=main.go:135 level=info msg="Listening on address" address=:9187
ts=2025-03-06T00:44:38.390Z caller=tls_config.go:195 level=info msg="TLS is disabled." http2=false
Activity
sysadmind commentedon Mar 10, 2025
I'm not sure what the problem is that you are asking about. Can you clarify what you are asking?
wangshuai0709 commentedon Mar 11, 2025
my container`s log only has tow lines,it do not work
wangshuai0709 commentedon Mar 11, 2025
my other container log is:
{"log":"ts=2024-04-11T07:24:23.880Z caller=main.go:135 level=info msg="Listening on address" address=:9187\n","stream":"stderr","time":"2024-04-11T07:24:23.880490707Z"}
{"log":"ts=2024-04-11T07:24:23.880Z caller=tls_config.go:195 level=info msg="TLS is disabled." http2=false\n","stream":"stderr","time":"2024-04-11T07:24:23.880647846Z"}
{"log":"ts=2024-04-11T07:25:05.283Z caller=server.go:74 level=info msg="Established new database connection" fingerprint=10.51.12.11:5432\n","stream":"stderr","time":"2024-04-11T07:25:05.283345176Z"}
{"log":"ts=2024-04-11T07:25:05.291Z caller=postgres_exporter.go:645 level=info msg="Semantic version changed" server=10.51.12.11:5432 from=0.0.0 to=13.4.0\n","stream":"stderr","time":"2024-04-11T07:25:05.291358683Z"}
This is the normal container.
sysadmind commentedon Mar 16, 2025
It will only try to establish the connection if you try to scrape the metrics. Are you sure that you have something scraping the /metrics HTTP endpoint?