You've already forked postgres_exporter
mirror of
https://github.com/prometheus-community/postgres_exporter.git
synced 2025-08-11 02:43:02 +03:00
Add a couple of pre-instructions to the README file for the build process. (#152)
This commit is contained in:
14
README.md
14
README.md
@@ -19,16 +19,18 @@ docker run -e DATA_SOURCE_NAME="postgresql://postgres:password@localhost:5432/?s
|
|||||||
## Building and running
|
## Building and running
|
||||||
The default make file behavior is to build the binary:
|
The default make file behavior is to build the binary:
|
||||||
```
|
```
|
||||||
|
go get github.com/wrouesnel/postgres_exporter
|
||||||
|
cd ${GOPATH-$HOME/go}/src/github.com/wrouesnel/postgres_exporter
|
||||||
make
|
make
|
||||||
export DATA_SOURCE_NAME="postgresql://login:password@hostname:port/dbname"
|
export DATA_SOURCE_NAME="postgresql://login:password@hostname:port/dbname"
|
||||||
./postgres_exporter <flags>
|
./postgres_exporter <flags>
|
||||||
```
|
```
|
||||||
|
|
||||||
To build the dockerfile, run `make docker`.
|
To build the dockerfile, run `make docker`.
|
||||||
|
|
||||||
This will build the docker image as `wrouesnel/postgres_exporter:latest`. This
|
This will build the docker image as `wrouesnel/postgres_exporter:latest`. This
|
||||||
is a minimal docker image containing *just* postgres_exporter. By default no SSL
|
is a minimal docker image containing *just* postgres_exporter. By default no SSL
|
||||||
certificates are included, if you need to use SSL you should either bind-mount
|
certificates are included, if you need to use SSL you should either bind-mount
|
||||||
`/etc/ssl/certs/ca-certificates.crt` or derive a new image containing them.
|
`/etc/ssl/certs/ca-certificates.crt` or derive a new image containing them.
|
||||||
|
|
||||||
### Vendoring
|
### Vendoring
|
||||||
@@ -36,7 +38,7 @@ Package vendoring is handled with [`govendor`](https://github.com/kardianos/gove
|
|||||||
|
|
||||||
### Flags
|
### Flags
|
||||||
|
|
||||||
* `web.listen-address`
|
* `web.listen-address`
|
||||||
Address to listen on for web interface and telemetry.
|
Address to listen on for web interface and telemetry.
|
||||||
|
|
||||||
* `web.telemetry-path`
|
* `web.telemetry-path`
|
||||||
@@ -112,7 +114,7 @@ CREATE SCHEMA postgres_exporter AUTHORIZATION postgres_exporter;
|
|||||||
CREATE VIEW postgres_exporter.pg_stat_activity
|
CREATE VIEW postgres_exporter.pg_stat_activity
|
||||||
AS
|
AS
|
||||||
SELECT * from pg_catalog.pg_stat_activity;
|
SELECT * from pg_catalog.pg_stat_activity;
|
||||||
|
|
||||||
GRANT SELECT ON postgres_exporter.pg_stat_activity TO postgres_exporter;
|
GRANT SELECT ON postgres_exporter.pg_stat_activity TO postgres_exporter;
|
||||||
|
|
||||||
CREATE VIEW postgres_exporter.pg_stat_replication AS
|
CREATE VIEW postgres_exporter.pg_stat_replication AS
|
||||||
|
Reference in New Issue
Block a user