Update README.md

This commit is contained in:
Will Rouesnel 2017-10-26 19:44:54 +11:00
parent 0e4c3ce395
commit e3dbbe64fd
1 changed files with 24 additions and 0 deletions

View File

@ -42,6 +42,30 @@ Package vendoring is handled with [`govendor`](https://github.com/kardianos/gove
* `web.telemetry-path` * `web.telemetry-path`
Path under which to expose metrics. 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 ### Setting the Postgres server's data source name
The PostgreSQL server's [data source name](http://en.wikipedia.org/wiki/Data_source_name) The PostgreSQL server's [data source name](http://en.wikipedia.org/wiki/Data_source_name)