Skip to content

Pgbouncer exporter doesn't support metrics exposed by updated pgbouncer. #47295

Closed

Description

@mjmammoth

Apache Airflow version

2.10.5

If "Other Airflow 2 version" selected, which one?

No response

What happened?

PGBouncer has been updated and now exposes more metrics than before - the exporter no longer supports the full list of metrics and the following error can be seen in the logs of the exporter:

could not get store result: could not get stats: unexpected column: total_server_assignment_count

The support has been added in upstream pg_exporter, supporting pgbouncer version 1.24 and up.

The pgbouncer base image was updated to 1.24 in the airflow-pgbouncer-2025.01.10-1.24.0 docker image, however the exporter has not been updated to support it.

The defaults for the helm chart are currently;

  pgbouncer:
    tag: airflow-pgbouncer-2025.01.10-1.24.0
  pgbouncerExporter:
    tag: airflow-pgbouncer-exporter-2024.06.18-0.17.0

Which are not compatible.

What you think should happen instead?

The exporter should be compatible with the version of pgbouncer deployed.

How to reproduce

Deploy the latest helm chart enabling pgbouncer, the logs for the metrics-exporter container in the pgbouncer pod will indicate the error

could not get store result: could not get stats: unexpected column: total_server_assignment_count

Operating System

Ubuntu 22.04

Versions of Apache Airflow Providers

No response

Deployment

Official Apache Airflow Helm Chart

Deployment details

pgbouncer enabled

Anything else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. boring-cyborg commented on Mar 3, 2025

    @boring-cyborg

    Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.

  2. Jarvl commented on Mar 5, 2025

    @Jarvl
    Contributor

    This will be partially addressed by #47416, however another PR will need created to update the helm chart defaults once this is merged and deployed.

  3. Jarvl commented on Mar 6, 2025

    @Jarvl
    Contributor

    This will be partially addressed by #47416, however another PR will need created to update the helm chart defaults once this is merged and deployed.

    Coming back to this. As I noted in #47416, simply updating pgbouncer_exporter to 0.18.0 will not provide support for pgbouncer 1.24, which is currently the default version in the helm chart.

    The support has been added in upstream pg_exporter, supporting pgbouncer version 1.24 and up.

    The link you provided is not to the pgbouncer_exporter library used by the helm chart, so this isn't true from the perspective of the helm chart. The helm chart instead uses the jbub/pgbouncer_exporter repo

    RUN URL="https://github.com/jbub/pgbouncer_exporter/archive/v${PGBOUNCER_EXPORTER_VERSION}.tar.gz" \

    Unfortunately this repo only provides support for pgbouncer 1.23 and below. I created an upstream issue jbub/pgbouncer_exporter#34 to address.

    There are two options to resolving this issue as I see it:

    1. Build a pgbouncer 1.23 image to at least provide a path to compatibility, even if the image is not set as the default in the helm chart (decrementing the default would be a breaking change).
    2. Wait until pgbouncer_exporter has support for pgbouncer 1.24 and create a PR for Airflow to bump the version of that library. I should have time to get a PR out for Incompatibility with stats introduced in pgbouncer 1.24 jbub/pgbouncer_exporter#34 this week.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions