Prometheus configuration error

While creating data source in graphana for prometheus url http://localhost:9090. It throws error .

Error reading Prometheus: Post “http://localhost:9090/api/v1/query”: dial tcp 127.0.0.1:9090: connect: connection refused

Welcome

Where is your prometheus installed at in relation to grafana?

prometheus is installed using docker . This is the command : docker run -d --name prometheus1 -p 9091:9090 -v /tmp/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus

Hi @shruti,

I think the error could be of the possible reasons;

  1. The firewall might be blocking the ports

  2. I think here most likely reason is that your prometheus.yml may have the wrong parameter for the server.

Can you please share your prometheus.yml file here so that the community see it.

Thanks