r/postgres-exporter: Deploy postgres-exporter
The [postgres-exporter][0] exposes PostgreSQL server statistics to Prometheus. It connects to a specified PostgreSQL server (in this case, a server on the local machine via UNIX socket) and collects data from the `pg_stat_activity`, et al. views. It needs the `pg_monitor` role in order to be allowed to read the relevant metrics. Since we're setting up the exporter to connect via UNIX socket, it needs a dedicated OS user to match the PostgreSQL user in order to authenticate via the _peer_ method. [0]: https://github.com/prometheus-community/postgres_exporter/
This commit is contained in:
@@ -23,6 +23,11 @@ postgresql_config:
|
||||
hot_standby: 'on'
|
||||
|
||||
pg_hba_extra:
|
||||
- type: local
|
||||
database: all
|
||||
user: postgres-exporter
|
||||
address: ''
|
||||
method: peer
|
||||
- type: hostssl
|
||||
database: sameuser
|
||||
user: all
|
||||
|
||||
Reference in New Issue
Block a user