Dial tcp 127.0.0.1:9090: connect: connection refused

i have got this message when i set prometheus server url

Post “http://127.0.0.1:9090/api/v1/query”: dial tcp 127.0.0.1:9090: connect: connection refused - There was an error returned querying the Prometheus API.

please help me to solve this.

type ifconfig on your system to get the local ip address and use that instead of localhost

1 Like

This seems to be a configuration issue. Please check if you need to enable firewall OR use localhost instead of IP address (maybe best is to update your /etc/hosts file)