Datasource 'Metric request error' PSQL

Hello !
I have grafana container and postgres container in the same machine with network_mode: host.
I have a problem with the PSQL datasource configuration wich when i click in ‘Save and test’ the error ‘Metric request error’ is showed to me.
I already create the user grafana, but i tested with postgres user and get the same error to.
obs: My PSQL database is used just to get relational data, nothing related with time series.

My datasource configuration:
Screenshot from 2020-04-17 19-13-20

The source code error:

anyone can help me with that?

Try host localhost:5432 - I don’t see a reason for http protocol. Please check Grafana logs, when problem is still there.

I found a solution for my problem, i change http://localhost:5432 to 127.0.0.1:5432 and now works.
thanks all!