coroot/coroot-pg-agent

pq: SSL is not enabled on the server

Closed this issue · 2 comments

sudo /usr/local/bin/coroot-pg-agent DSN="postgresql://postgres:passwor@localhost:5432/postgres?connect_timeout=1&statement_timeout=30000"
W0513 23:31:18.160103 292209 collector.go:96] probe failed: pq: SSL is not enabled on the server
I0513 23:31:18.160235 292209 main.go:35] static labels: map[]
I0513 23:31:18.160729 292209 main.go:41] listening on: 0.0.0.0:80
W0513 23:31:18.165435 292209 collector.go:123] pq: SSL is not enabled on the server
W0513 23:31:33.168268 292209 collector.go:123] pq: SSL is not enabled on the server
W0513 23:31:48.164631 292209 collector.go:123] pq: SSL is not enabled on the server
W0513 23:32:03.170949 292209 collector.go:123] pq: SSL is not enabled on the server
W0513 23:32:18.171431 292209 collector.go:123] pq: SSL is not enabled on the server
W0513 23:32:33.169117 292209 collector.go:123] pq: SSL is not enabled on the server
W0513 23:32:48.166895 292209 collector.go:123] pq: SSL is not enabled on the server
W0513 23:33:03.168719 292209 collector.go:123] pq: SSL is not enabled on the server
W0513 23:33:18.168518 292209 collector.go:123] pq: SSL is not enabled on the server

Is there a way to bypass SSL and connect coroot-pg-agent to Postgresql database ?

@altdelnow, you can add sslmode=disable to the DSN

postgresql://postgres:passwor@localhost:5432/postgres?connect_timeout=1&statement_timeout=30000&sslmode=disable