From c929bad6a1981e3726012d9c3d1b68900156dd26 Mon Sep 17 00:00:00 2001 From: Will Rouesnel Date: Fri, 20 May 2016 19:04:31 +1000 Subject: [PATCH] README.md connection strings were wrong Looks like lib/pq has updated their connection strings upstream so the URL parsing is more URL-like. --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 76095c15..6e9f5f6f 100644 --- a/README.md +++ b/README.md @@ -6,14 +6,17 @@ Supported Postgres versions: 9.1 and up. ## Quick Start This package is available for Docker: ``` -docker run -e DATA_SOURCE_NAME="login:password@(hostname:port)/dbname" -p 9113:9113 wrouesnel/postgres_exporter +# Start an example database +docker run --net=host -it --rm -e POSTGRES_PASSWORD=password postgres +# Connect to it +docker run -e DATA_SOURCE_NAME="postgresql://postgres:password@localhost:5432/?sslmode=disable" -p 9113:9113 wrouesnel/postgres_exporter ``` ## Building and running The default make file behavior is to build the binary: ``` make -export DATA_SOURCE_NAME="login:password@(hostname:port)/dbname" +export DATA_SOURCE_NAME="postgresql://login:password@hostname:port/dbname" ./postgres_exporter ```