Skip to content

postgres_exporter is stuck and do not log out #1135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wangshuai0709 opened this issue Mar 6, 2025 · 4 comments
Open

postgres_exporter is stuck and do not log out #1135

wangshuai0709 opened this issue Mar 6, 2025 · 4 comments

Comments

@wangshuai0709
Copy link

postgres_exporter start command:
docker run --net=host -d --restart=always --name=postgres-exporter -e DATA_SOURCE_NAME="postgresql://postgres_exporter:[email protected]: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

@sysadmind
Copy link
Contributor

I'm not sure what the problem is that you are asking about. Can you clarify what you are asking?

@wangshuai0709
Copy link
Author

wangshuai0709 commented Mar 11, 2025

I'm not sure what the problem is that you are asking about. Can you clarify what you are asking?

my container`s log only has tow lines,it do not work

@wangshuai0709
Copy link
Author

wangshuai0709 commented 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
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants