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""
Describe the bug A clear and concise description of what the bug is.
To reproduce Steps to reproduce the behavior:
- Deploy using 'some_command'
- View logs '....'
- 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.
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?
I also experience the same, exposed the Nginx stub-status on 8080 port:

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
Solved it with the help of: https://github.com/nginxinc/nginx-prometheus-exporter/issues/272
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.
This issue was closed because it has been stalled for 10 days with no activity.