Skip to main content
Version Next

PgBouncer Metrics Exporter Configuration

The PgBouncer Metrics Exporter exposes metrics such as the number of active connections, connections waiting in queue, resource usage by PgBouncer, among others. These metrics help fine-tune pooling behavior and ensure the environment efficiently handles client requests.

This configuration allows defining the port used to expose PgBouncer metrics for Prometheus collection.

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 Exportador de Métricas PgBouncer option.

  3. Add the connection pool management instance(s).

    warning

    This metrics exporter requires the previous configuration of the parameter ignore_startup_parameters with the value extra_float_digits for each PgBouncer instance.

    It is possible to perform this configuration directly through PgSmart, using the connection pool service configuration option.

    This configuration is necessary for the connection driver to ignore certain parameters during connection initialization.

    It is important to note that the PgBouncer metrics exporter will be configured by PgSmart regardless of this configuration. However, metrics will only be exported after the ignore_startup_parameters parameter is properly set.

3.1. Enter the connection management port for the connection pool.

3.2. Enter the user for managing the connection pools.

3.3. Enter the password for the user managing the connection pools.

3.4. Confirm whether you want to add another connection pool management instance.

3.5. Enter the metrics exposure port and web interface.

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

You can add as many instances as needed.

note

The exported metrics can be viewed via console:

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

Or via web interface:

http://192.168.56.234:9100/metrics