Closed regardfs closed 7 years ago
Hi, I find there few doc about how to implement this in prometheus, below is my configuration prometheus.yml
- job_name: 'nginx-exporter' scrape_interval: 15s static_configs: targets: ["http://172.17.15.101/status/format/json"] relabel_configs: sourcelabels: [__address_\] regex: (^http://.*) target_label: __param_target source_labels: [__param_target] target_label: host source_labels: [] regex: .* targetlabel: __address_\ replacement: 172.17.15.101:9913
- job_name: 'nginx-exporter' scrape_interval: 15s static_configs:
docker-compose.yml
nginx-exporter: image: sophos/nginx-vts-exporter ports: - 9913:9913 environment: NGINX_HOST: "http://172.17.15.101/status/format/json"
Thanks a ton....T T, wait for u help.
targets in prometheus.yml should be the address of nginx-vts-exportor. For example
prometheus.yml
nginx-vts-exportor
- targets: ["http://172.17.15.101:9913"]
Hi, I find there few doc about how to implement this in prometheus, below is my configuration prometheus.yml
docker-compose.yml
Thanks a ton....T T, wait for u help.