Skip to main content
Version 3.1.0

PgBouncer Metrics Exporter Configuration

The PgBouncer Metrics Exporter exposes metrics such as the number of active connections, connections waiting in the queue, resource usage by PgBouncer, among others. This information is important to adjust the pooling operation and ensure that the environment is responding efficiently to client requests.

Through this configuration option, it is possible to specify the exposure port for PgBouncer metrics to be collected by Prometheus.

Prerequisites
Command Syntax
Terminal input
pgsmart obs exporter config [FLAGS]

Flags

  • -a, --agent=<agent> => Alias, hostname, or IP of the server where the desired PgSmart Agent is installed.
  • -h, --help => Help
Non-Interactive Configuration

Non-interactive execution is disabled for this operation.

Interactive Configuration
Terminal input
pgsmart obs exporter config

PgBouncer Exporter Configuration

  1. Select the PgSmart Agent or register a new one.

  2. Select the PgBouncer Metrics Exporter.

  3. Add the Connection Pool Management instance(s).

    warning

    This metrics exporter requires the pre-configuration of the _ignore_startup_parameters_ parameter with the value _extra_float_digits_ for each PgBouncer instance.

    This configuration can be done by PgSmart itself through the Connection Pool service configuration option.

    This configuration is necessary for the connection driver to ignore certain parameters when initializing the connection.

    It is important to note that the PgBouncer metrics exporter will be configured by PgSmart regardless of this configuration. However, the metrics export will only start after the _ignore_startup_parameters_ parameter is configured.

    3.1. Provide the connection port for Connection Pool Management.

    3.2. Provide the user for Connection Pool Management.

    3.3. Provide the password for the Connection Pool Management user.

    3.4. Confirm if you want to add another Connection Pool Management instance.

    3.5. Provide the metrics exposure port and web interface.

    Figure 1 - PgBouncer Metrics Exporter Configuration
    Figure 1 - PgBouncer Metrics Exporter Configuration
    note

    As many instances as necessary can be added.

    note

    The exported metrics can be viewed via the console:

    Terminal input
        curl http://192.168.56.234:9100/metrics

    Or via the web interface:

    Terminal input
        http://192.168.56.234:9100/metrics