mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2024-11-15 06:52:51 +01:00
90cfdabb2b
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
30 lines
1.9 KiB
Markdown
30 lines
1.9 KiB
Markdown
# Enabling metrics and graphs for Postgres (optional)
|
|
|
|
Expanding on the metrics exposed by the [synapse exporter and the node exporter](configuring-playbook-prometheus-grafana.md), the playbook enables the [postgres exporter](https://github.com/prometheus-community/postgres_exporter) that exposes more detailed information about what's happening on your postgres database.
|
|
|
|
## Adjusting the playbook configuration
|
|
|
|
To enable the postgres exporter, add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file:
|
|
|
|
```yaml
|
|
prometheus_postgres_exporter_enabled: true
|
|
```
|
|
|
|
## Installing
|
|
|
|
After configuring the playbook, run the [installation](installing.md) command: `just install-all` or `just setup-all`
|
|
|
|
## What does it do?
|
|
|
|
Name | Description
|
|
-----|----------
|
|
`prometheus_postgres_exporter_enabled`|Enable the postgres prometheus exporter. This sets up the docker container, connects it to the database and adds a 'job' to the prometheus config which tells prometheus about this new exporter. The default is 'false'
|
|
`prometheus_postgres_exporter_database_username`| The 'username' for the user that the exporter uses to connect to the database. The default is 'matrix_prometheus_postgres_exporter'
|
|
`prometheus_postgres_exporter_database_password`| The 'password' for the user that the exporter uses to connect to the database. By default, this is auto-generated by the playbook
|
|
`prometheus_postgres_exporter_container_labels_traefik_enabled`|If set to `true`, exposes the Postgres exporter metrics on `https://matrix.example.com/metrics/postgres-exporter` for usage with an [external Prometheus server](configuring-playbook-prometheus-grafana.md#collecting-metrics-to-an-external-prometheus-server). To password-protect the metrics, see `matrix_metrics_exposure_http_basic_auth_users` on that other documentation page.
|
|
|
|
|
|
## More information
|
|
|
|
- [The PostgresSQL dashboard](https://grafana.com/grafana/dashboards/9628) (generic postgres dashboard)
|