Hi, I have a similar problem. I am using Amazon Linux on some EC2 instances. I’m using one instance and trying to get Grafana to display Prometheus metrics from another instance. I tried to follow the instructions given at this link:
But when I try to create the data source I get “HTTP Error Bad Gateway”. I tried localhost:9090 as well as ec2-13-59-121-49.us-east-2.compute.amazonaws.com:9090 but I got the same error for both of those. Any suggestions would be appreciated.
[ec2-user@ip-172-31-31-74 ~] curl http://[ip of other instance]:7070/metrics
curl: (7) Failed to connect to ec2-13-59-121-49.us-east-2.compute.amazonaws.com port 7070: Connection timed out
[ec2-user@ip-172-31-31-74 ~] curl [http://]localhost:7070/metrics
curl: (7) Failed to connect to localhost port 7070: Connection refused
I also tried 9090 with the same result.