From e3dbbe64fd3c6711fc703ef21c02f76caf09d038 Mon Sep 17 00:00:00 2001 From: Will Rouesnel Date: Thu, 26 Oct 2017 19:44:54 +1100 Subject: [PATCH] Update README.md --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index df350036..b8597f2b 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,30 @@ Package vendoring is handled with [`govendor`](https://github.com/kardianos/gove * `web.telemetry-path` Path under which to expose metrics. +### Environment Variables + +The following environment variables configure the exporter: + +* `DATA_SOURCE_NAME` + the default legacy format. Accepts URI form and key=value form arguments. The + URI may contain the username and password to connect with. + +* `DATA_SOURCE_URI` + an alternative to DATA_SOURCE_NAME which exclusively accepts the raw URI + without a username and password component. + +* `DATA_SOURCE_USER` + When using `DATA_SOURCE_URI`, this environment variable is used to specify + the username. +* `DATA_SOURCE_USER_FILE` + The same, but reads the username from a file. + +* `DATA_SOURCE_PASS` + When using `DATA_SOURCE_URI`, this environment variable is used to specify + the password to connect with. +* `DATA_SOURCE_PASS_FILE` + The same as above but reads the password from a file. + ### Setting the Postgres server's data source name The PostgreSQL server's [data source name](http://en.wikipedia.org/wiki/Data_source_name)