-
Notifications
You must be signed in to change notification settings - Fork 805
Description
Hi,
I'm trying postgres_exporter for Prometheus. I need some help about the syntax for the DATA_SOURCE_NAME variable in the case we have multiple database in one instance.
On my postgresql server, I have 2 database (Bills and Customers).
It worked when I set DATA_SOURCE_NAME with a single DB like this :
export DATA_SOURCE_NAME="postgresql://login:password@localhost:5432/bills?sslmode=disable"
or
export DATA_SOURCE_NAME="postgresql://login:password@localhost:5432/customers?sslmode=disable
But I got those messages error when I set the DATA_SOURCE_NAME like this :
export DATA_SOURCE_NAME="postgresql://login:password@localhost:5432/bills?sslmode=disable,postgresql://login:password@localhost:5432/customers?sslmode=disable"
INFO[0000] Established new database connection. source="postgres_exporter.go:1035"
INFO[0000] Error while closing non-pinging DB connection: source="postgres_exporter.go:1041"
INFO[0000] Error opening connection to database (postgresql://login:PASSWORD_REMOVED@localhost:5432/bills?sslmode=disable,postgresql://login:password@localhost:5432/customers?sslmode=disable): pq: unsupported sslmode "disable,postgresql://postgres:postgres@localhost:5432/postgres2?sslmode=disable"; only "require" (default), "verify-full", "verify-ca", and "disable" supported source="postgres_exporter.go:1070"
Could you help me with the correct syntax please ? O should I launch one exporter per database ?
I'm grateful in advance :)
Kinds