I’ve been struggling with this issue for a couple of days now. I’ve managed to add two Postgres DBs as data sources onto my local Grafana but have had no success at all on the hosted Grafana. I am just getting a 504 Bad Getaway error when trying to add my AWS RDS PostgreSQL DB, however I am struggling to understand why. My guess would be that this is due to some kind of permission issue but I have no idea what I should do to “grant” access to my hosted Grafana to the AWS DB, given I don’t know the IP I should give for the hosted Grafana in the security groups etc.
If anyone has any advice or lead, that would be really appreciated.
Thanks a lot in advance!
Actually this is resolved. I ran into a post mentioning all the IPs used by Hosted Grafana, which can be found here (https://grafana.com/api/hosted-grafana/source-ips).
For those interested, you need to enter all these manually one-by-one in the relevant Security Group in the AWS/RDS console, adding “…/32” at the end of each one.
Just keep in mind, that these IPs (https://grafana.com/api/hosted-grafana/source-ips) are not constant. They can be changed/updated when:
- some hosts fail and are replaced
- new servers are added
- some hosts are upgraded
Any suggestion about the way to make this more stable then?
Is there a different way to give Hosted Grafana the credentials to access my AWS PostgresDB?
Thanks for your help,
I’ve tried to allow connections from the list of IPs returned from the API call and I still can’t connect, I get 503 when testing the connection in Grafana. If I change my security group to allow traffic from the web testing the connection works, so, is this API interface reliable?