How can we scapre metrics from nginx-proxy container #2590
Unanswered
kranthikirang
asked this question in
Q&A
Replies: 1 comment
-
|
Hello @kranthikirang, I'm using the NGINX Prometheus Exporter to get my metrics into prometheus. Here is a version: '3.7'
services:
nginx-proxy:
container_name: nginx-proxy
image: nginxproxy/nginx-proxy
restart: always
ports:
- 80:80
- 443:443
labels:
- com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy
- com.centurylinklabs.watchtower.scope=infrastructure
volumes:
- certs:/etc/nginx/certs:ro
- vhost:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- cache:/var/cache/nginx
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./conf/uploadsize.conf:/etc/nginx/conf.d/uploadsize.conf
- ./conf/headercustomconf.conf:/etc/nginx/conf.d/headercustomconf.conf
- ./conf/nginx-stubs.conf:/etc/nginx/conf.d/nginx-stubs.conf
ENABLE_IPV6: 'True'
DEFAULT_HOST: "barnes.biz"
nginx-prometheus-exporter:
image: nginx/nginx-prometheus-exporter
container_name: nginx-prometheus-exporter
labels:
- com.centurylinklabs.watchtower.scope=infrastructure
restart: always
command:
- '--nginx.scrape-uri=http://nginx-proxy/nginx_status'
ports:
- "9113:9113"
depends_on:
- nginx-proxyAnd then you have to define a job for prometheus to scrape: scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets:
- nginx-prometheus-exporter:9113Hope this helps |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, We would like understand if there is anyway to scrape prometheus metrics from the nginx-proxy container using /stub_status or something? Please share the information.
Beta Was this translation helpful? Give feedback.
All reactions