mash-playbook/docs/services/prometheus-postgres-exporter.md
Slavi Pantaleev f767fecbfd Rename service docs file (postgres-exporter.md -> prometheus-postgres-exporter.md) and announce on services list
Related to https://github.com/mother-of-all-self-hosting/mash-playbook/pull/58

Renaming because:

- we already have other Prometheus exporters, which follow the `prometheus-*-exporter` naming

- being more explicit is clearer in any case

- the role is named `*-prometheus-postgres-exporter`, so it's also
  consistent with that
2023-05-17 21:25:42 +03:00

2.2 KiB

Postgres Exporter

This playbook can configure Postgres Exporter by utilizing mother-of-all-self-hosting/ansible-role-postgres-exporter.

Configuration

To enable this service, add the following configuration to your vars.yml file and re-run the installation process:

########################################################################
#                                                                      #
# prometheus_postgres_exporter                                                    #
#                                                                      #
########################################################################

prometheus_postgres_exporter_enabled: true

# To expose the metrics publicly, enable and configure the lines below:
# prometheus_postgres_exporter_hostname: mash.example.com
# prometheus_postgres_exporter_path_prefix: /metrics/postgres-exporter

# To protect the metrics with HTTP Basic Auth, enable and configure the lines below:
# prometheus_postgres_exporter_basicauth_enabled: true
# prometheus_postgres_exporter_basicauth_user: your_username
# prometheus_postgres_exporter_basicauth_password: your password

########################################################################
#                                                                      #
# /prometheus_postgres_exporter                                                   #
#                                                                      #
########################################################################

Unless you're scraping the Postgres Exporter metrics from a local Prometheus instance, as described in Integrating with Postgres Exporter, you will probably wish to expose the metrics publicly so that a remote Prometheus instance can fetch them.

Usage

After you installed the exporter, your stats will be available on mash.example.com/metrics/postgres-exporter with basic auth credentials you configured