From 5d4c9f24e82cc1dfb36ebe252e2fc05334b2089a Mon Sep 17 00:00:00 2001 From: "Mahlon E. Smith" Date: Tue, 20 Feb 2018 10:59:26 -0800 Subject: [PATCH] Remove port and user from the default dbopts, so they instead use the postgresql behavioral default. --- README.md | 5 ++++- netdata_tsrelay.nim | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f792e75..f72072f 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,10 @@ Flags that require arguments must include an '=' or ':' character. All database connection options are passed as a key/val string to the *dbopts* flag. The default is: - "host=localhost port=5432 dbname=netdata user=netdata application_name=netdata-tsrelay" + "host=localhost dbname=netdata application_name=netdata-tsrelay" + +... which uses the default PostgreSQL port, and connects as the running +user. Reference the [PostgreSQL Documentation](https://www.postgresql.org/docs/current/static/libpq-conn diff --git a/netdata_tsrelay.nim b/netdata_tsrelay.nim index 89317c1..f27532a 100644 --- a/netdata_tsrelay.nim +++ b/netdata_tsrelay.nim @@ -56,7 +56,7 @@ const -h: Help. You're lookin' at it. The default connection string is: - "host=localhost port=5432 dbname=netdata user=netdata application_name=netdata-tsrelay" + "host=localhost dbname=netdata application_name=netdata-tsrelay" """ INSERT_SQL = """ INSERT INTO $1 @@ -259,7 +259,7 @@ proc parse_cmdline: Config = # Config object defaults. # result = Config( - dbopts: "host=localhost port=5432 dbname=netdata user=netdata application_name=netdata-tsrelay", + dbopts: "host=localhost dbname=netdata application_name=netdata-tsrelay", dbtable: "netdata", listen_port: 14866, listen_addr: "0.0.0.0",