TransWikia.com

Prometheus container connection refused

Server Fault Asked by Tyr_90 on December 9, 2021

I have prometheus , nginx-vts , php and nginx-vts-exporter all in separated containers i’m trying to get metrics to prometheus from the exporter ,, it keeps telling me
Get http://127.0.0.1:9913/metrics: dial tcp 127.0.0.1:9913: connect: connection refused

this is the error

this is my prometheus.yml

global:

scrape_interval: 15s

evaluation_interval: 15s

scrape_configs:

  • job_name: nginx

    static_configs:

    • targets: [‘127.0.0.1:9913’]

this is an error from the exporter when i run the compose file

fetchHTTP failed Get http://localhost/status/format/json: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

One Answer

When we run Prometheus with Node exporter or any other metrics collecting container, we have to add this in the Prometheus configuration file.

Here, while defining "targets" under "scrape_configs" mention the IP address of the host machine where node exporter is running.

Use "['localhost:9090']" for prometheus and "['host_IP:9100']" for node exporter or any other metrics collecting container.

Answered by mayur murkya on December 9, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP