Error when I use multiple string connect strings in exporter environment file, works fine for one connect string.
DATA_SOURCE_NAME=pstgresql://[email protected]:5432/postgres?sslmode=disable, postgresql://[email protected]:5432/postgres?sslmode=disable Log: with one connect string Nov 12 15:08:45 ari39-vm-07660 systemd[1]: Started Prometheus exporter for Postgresql. Nov 12 15:08:45 ari39-vm-07660 postgres_exporter[38167]: time=“2021-11-12T15:08:45Z” level=info msg=“Established new database connection to “100.112.10.132:5432”.” source=“postgres_exporter.go:814” Nov 12 15:08:46 ari39-vm-07660 postgres_exporter[38167]: time=“2021-11-12T15:08:46Z” level=info msg=“Semantic Version Changed on “100.112.10.132:5432”: 0.0.0 → 13.2.0” source=“postgres_exporter.go:1335” With multiple connect strings: Nov 12 15:26:04 ari39-vm-07660 systemd[1]: Stopped Prometheus exporter for Postgresql. Nov 12 15:26:04 ari39-vm-07660 systemd[1]: Started Prometheus exporter for Postgresql. Nov 12 15:26:04 ari39-vm-07660 postgres_exporter[39107]: time=“2021-11-12T15:26:04Z” level=info msg=“Established new database connection to “localhost:5432”.” source=“postgres_exporter.go:814” Nov 12 15:26:05 ari39-vm-07660 postgres_exporter[39107]: time=“2021-11-12T15:26:05Z” level=info msg=“Established new database connection to “localhost:5432”.” source=“postgres_exporter.go:814” Nov 12 15:26:07 ari39-vm-07660 postgres_exporter[39107]: time=“2021-11-12T15:26:07Z” level=info msg=“Established new database connection to “localhost:5432”.” source=“postgres_exporter.go:814” Nov 12 15:26:10 ari39-vm-07660 postgres_exporter[39107]: time=“2021-11-12T15:26:10Z” level=error msg=“Error opening connection to database (pstgresql://monitor:[email protected]:5432/postgres?sslmode=disable): dial tcp 127.0.0.1:5432: connect: connection refused” source=“postgres_exporter.go:1438” Nov 12 15:26:10 ari39-vm-07660 postgres_exporter[39107]: time=“2021-11-12T15:26:10Z” level=error msg=“Unable to parse DSN (could not parse DATA_SOURCE_NAME): parse postgresql://monitor:[email protected]:5432/postgres?sslmode=disable: first path segment in URL cannot contain colon” source=“postgres_exporter.go:1431” Nov 12 15:26:10 ari39-vm-07660 postgres_exporter[39107]: time=“2021-11-12T15:26:10Z” level=info msg=“Established new database connection to “localhost:5432”.” source=“postgres_exporter.go:814” -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/0508ac8c-ad34-4f03-97f5-12868a3b3ebdn%40googlegroups.com.

