Skip to content

[Proposal] Add support for PgBouncer authentication failure log format #1881

Closed

Description

@VATICAN-PSYCHO

PgBouncer logs auth failures in a different format than PostgreSQL, so the current parser rules do not match these entries and the real client IP is not extracted. Its also impossible to change logging format.

Example PgBouncer logs:

1970-01-01 21:37:00.001 CEST [1625783] LOG C-0x560d63ecd828: postgres/[email protected]:54878 login attempt: db=postgres user=postgres tls=TLSv1.3/TLS_AES_256_GCM_SHA384 replication=no
1970-01-01 21:37:00.005 CEST [1625783] ERROR C-0x560d63ecd828: postgres/[email protected]:54878 password authentication failed
1970-01-01 21:37:00.010 CEST [1625783] LOG C-0x560d63ecd828: postgres/[email protected]:54878 closing because: SASL authentication failed (age=0s)
1970-01-01 21:37:00.015 CEST [1625783] WARNING C-0x560d63ecd828: postgres/[email protected]:54878 pooler error: SASL authentication failed

Proposed rule for this case:

%{TIMESTAMP_ISO8601:timestamp} %{WORD:zone} \[%{INT:pid}\] ERROR C-%{NOTSPACE:connection_id}: %{DATA:pgsql_dbname}/%{DATA:pgsql_user}@%{IP:source_ip}:%{INT:source_port} password authentication failed

This will extract following fields:

timestamp
zone
pid
connection_id
pgsql_dbname
pgsql_user
source_ip
source_port

Activity

  1. added
    good first issue
    help wanted
    on Sep 15, 2026
  2. tayfuryldz commented on Sep 15, 2026

    @tayfuryldz

    I'd like to take this. I'll keep it scoped to PgBouncer authentication-failure parsing: add the parser coverage needed to extract the client IP/user/database from the reported log shape, add hubtest fixtures/assertions for the failure event, and run the Hub linter plus the relevant parser test before opening a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issuehelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions