Grafana and AWS postgres RDS integration

Hi, I am trying to integrate grafana with AWS postgressql RDS database so that I can retrieve the DB data from grafana. But I am getting the below error. I tried whitelisting grafana ips in the inbound rules of the RDS security group.
The log messages:


logger=tsdb.postgres msg="Successfully connected to Postgres" logger=tsdb.postgres msg="Successfully connected to Postgres" 
logger=tsdb.postgres msg="Check health failed" error="dial tcp x.x.x.x:5432: connect: no route to host" 
logger=tsdb.postgres msg="Query error" err="dial tcp x.x.x.x:5432: connect: no route to host" 
logger=tsdb.postgres msg="Disposing DB..." 
logger=tsdb.postgres msg="DB disposed"

You don’t have network connectivity to RDS from Grafana. How did you configure networking on boths sides?

I added grafana OS cluster ip to the inbound rules of RDS and added the security group of RDS to the inbound rules of grafana OS cluster. Now I am getting this error

msg="Check health failed" error="pq: no pg_hba.conf entry for host \"x.x.x.x\", user \"someuser\", database \"somedb\", no encryption" 

It worked. I had to update the parameter group on RDS side. Thanks

1 Like