Issue with posgresSQL datasource

I’m trying to configure postgresql datasource with this DSN:

postgres://main:*****@*****/main?sslmode=verify-ca&sslrootcert=./db/certs/ca.pem&sslkey=./db/certs/client.key&sslcert=./db/certs/client.pem

That is I adapt it to grafana fields in the datasource selection. However when I click save & test I get an error:

Metrics request error

When I omit all CA/cert/key stuff I get a proper error x509: certificate signed by unknown authority, but this error is super unhelpful since I have no idea what’s actually wrong. I’ve tested DSN locally and it works as expected

Some fields have information icon, which gives you more details, e.g.:

=> so you should to provide path to the cert file, not a cert content. The same is for client cert/key.

hmm ok; how do I do that with grafana cloud?

2 Likes