profile
viewpoint

Ask questionsSSL not enabled - version 0.4.7

Hello I am running the latest version of the exporter and seem to still have this problem that other have had.

Aug 16 15:54:47 sql01 postgres_exporter: time="2019-08-16T15:54:47-05:00" level=info msg="Starting Server: :9187" source="postgres_exporter.go:1178"
Aug 16 15:55:01 sql01 postgres_exporter: time="2019-08-16T15:55:01-05:00" level=info msg="Established new database connection." source="postgres_exporter.go:1035"
Aug 16 15:55:01 sql01 postgres_exporter: time="2019-08-16T15:55:01-05:00" level=info msg="Error while closing non-pinging DB connection: <nil>" source="postgres_exporter.go:1041"
Aug 16 15:55:01 sql01 postgres_exporter: time="2019-08-16T15:55:01-05:00" level=info msg="Error opening connection to database (postgresql://:PASSWORD_REMOVED@): pq: SSL is not enabled on the server" source="postgres_exporter.go:1070"
[username@sql01 ~]$ 

Here is my /etc/default/postgres_exporter

[username@sql01 ~]$ sudo cat /etc/default/postgres_exporter 
export DATA_SOURCE_NAME="postgresql://postgres:Test123!@10.150.10.20:5432/?sslmode=disable"
[username@sql01 ~]$ 

CentOS 7 (latest) Postgres 9.2. SELinux is turned on.

wrouesnel/postgres_exporter

Answer questions andrewm659

Manually downloaded newest version and getting this

Aug 16 16:14:30 sql01 postgres_exporter: time="2019-08-16T16:14:30-05:00" level=error msg="Error opening connection to database (postgresql://:PASSWORD_REMOVED@): malformed dsn \"\"" source="postgres_exporter.go:1336"
Aug 16 16:14:30 sql01 postgres_exporter: time="2019-08-16T16:14:30-05:00" level=info msg="Starting Server: :9187" source="postgres_exporter.go:1437"
Aug 16 16:14:31 sql01 postgres_exporter: time="2019-08-16T16:14:31-05:00" level=error msg="Error opening connection to database (postgresql://:PASSWORD_REMOVED@): malformed dsn \"\"" source="postgres_exporter.go:1336"
useful!
source:https://uonfu.com/
Github User Rank List