nginx-prometheus-exporter icon indicating copy to clipboard operation
nginx-prometheus-exporter copied to clipboard

hello i'm using prometheus to monitor nginx i got this error ""2022/05/09 14:31:49 Starting NGINX Prometheus Exporter Version=0.4.2 GitCommit=f017367 2022/05/09 14:31:49 Could not create Nginx Client: failed to get http://172.17.0.1:9113/stub_status: Get http://172.17.0.1:9113/stub_status: read tcp 192.168.96.3:40334->172.17.0.1:9113: read: connection reset by peer""

Open khawlamakhzoumi opened this issue 3 years ago • 3 comments

Describe the bug A clear and concise description of what the bug is.

To reproduce Steps to reproduce the behavior:

  1. Deploy using 'some_command'
  2. View logs '....'
  3. See error

Expected behavior A clear and concise description of what you expected to happen.

Your environment

  • Version of the Prometheus exporter - release version or a specific commit
  • Version of Docker/Kubernetes
  • [if applicable] Kubernetes platform (e.g. Mini-kube or GCP)
  • Using NGINX or NGINX Plus

Additional context Add any other context about the problem here. Any log files you want to share.

khawlamakhzoumi avatar May 09 '22 14:05 khawlamakhzoumi

Did you: For NGINX, expose the [stub_status page](https://nginx.org/en/docs/http/ngx_http_stub_status_module.html#stub_status) at /stub_status on port 8080.

As mentioned in the readme?

brianehlert avatar May 09 '22 14:05 brianehlert

I also experience the same, exposed the Nginx stub-status on 8080 port: image

But the exporter throws:

docker run -p 9113:9113 nginx/nginx-prometheus-exporter:0.10.0 -nginx.scrape-uri=http://localhost:8080/stub_status
2022/06/30 09:26:18 Starting NGINX Prometheus Exporter version=0.10.0 commit=7a03d0314425793cf4001f0d9b0b2cfd19563433 date=2021-12-21T19:24:34Z
2022/06/30 09:26:18 Could not create Nginx Client: failed to get http://localhost:8080/stub_status: Get "http://localhost:8080/stub_status": dial tcp 127.0.0.1:8080: connect: connection refused

balint729 avatar Jun 30 '22 09:06 balint729

Solved it with the help of: https://github.com/nginxinc/nginx-prometheus-exporter/issues/272

balint729 avatar Jun 30 '22 09:06 balint729

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 10 days.

github-actions[bot] avatar Sep 29 '22 02:09 github-actions[bot]

This issue was closed because it has been stalled for 10 days with no activity.

github-actions[bot] avatar Oct 10 '22 02:10 github-actions[bot]