@@ -15,7 +15,7 @@ This package is available for Docker:
15
15
# Start an example database
16
16
docker run --net=host -it --rm -e POSTGRES_PASSWORD=password postgres
17
17
# Connect to it
18
- docker run --net=host -e DATA_SOURCE_NAME="postgresql://postgres:password@localhost:5432/postgres?sslmode=disable" wrouesnel/postgres_exporter
18
+ docker run --net=host -e DATA_SOURCE_NAME="postgresql://postgres:password@localhost:5432/postgres?sslmode=require" mattalord/postgres_exporter_ssl
19
19
```
20
20
21
21
## Building and running
@@ -33,11 +33,6 @@ $ ./postgres_exporter <flags>
33
33
34
34
To build the dockerfile, run ` go run mage.go docker ` .
35
35
36
- This will build the docker image as ` wrouesnel/postgres_exporter:latest ` . This
37
- is a minimal docker image containing * just* postgres_exporter. By default no SSL
38
- certificates are included, if you need to use SSL you should either bind-mount
39
- ` /etc/ssl/certs/ca-certificates.crt ` or derive a new image containing them.
40
-
41
36
### Vendoring
42
37
Package vendoring is handled with [ ` govendor ` ] ( https://github.com/kardianos/govendor )
43
38
@@ -127,7 +122,7 @@ must be set via the `DATA_SOURCE_NAME` environment variable.
127
122
128
123
For running it locally on a default Debian/Ubuntu install, this will work (transpose to init script as appropriate):
129
124
130
- sudo -u postgres DATA_SOURCE_NAME="user=postgres host=/var/run/postgresql/ sslmode=disable " postgres_exporter
125
+ sudo -u postgres DATA_SOURCE_NAME="user=postgres host=/var/run/postgresql/sslmode=require " postgres_exporter
131
126
132
127
Also, you can set a list of sources to scrape different instances from the one exporter setup. Just define a comma separated string.
133
128
@@ -237,7 +232,7 @@ GRANT SELECT ON postgres_exporter.pg_stat_replication TO postgres_exporter;
237
232
> ** NOTE**
238
233
> <br />Remember to use ` postgres ` database name in the connection string:
239
234
> ```
240
- > DATA_SOURCE_NAME=postgresql://postgres_exporter:password@localhost:5432/postgres?sslmode=disable
235
+ > DATA_SOURCE_NAME=postgresql://postgres_exporter:password@localhost:5432/postgres?sslmode=require
241
236
> ```
242
237
243
238
# Hacking
0 commit comments