For the complete documentation index, see llms.txt. This page is also available as Markdown.

PgBouncer

The PgBouncer source collects logs from a PgBouncer connection pooler. It tails one or more PgBouncer log files from disk and, optionally, parses each line into structured fields. This source collects logs only; it does not scrape metrics.

Supported Telemetry Types

Platform
Metrics
Logs
Traces

Linux

Windows

macOS

Prerequisites

  • PgBouncer configured to write to a log file. Set logfile in pgbouncer.ini to the path the collector will read. See the PgBouncer configuration reference for the logfile and related log settings.

  • The collector must run on the same host as PgBouncer (or have read access to the PgBouncer log file by another means).

  • The collector process must have read permission on the configured log file path(s).

If PgBouncer is configured to send logs to syslog rather than a file, use a syslog-based source instead; this source reads from log files on disk.

Configuration

Bindplane docs - PgBouncer - image 1

Logs

Parameter
Type
Required
Default
Description

Log Paths

Strings

No

/var/log/pgbouncer/pgbouncer.log

File paths to PgBouncer logs. Accepts multiple paths.

Advanced

Parameter
Type
Required
Default
Description

Start At

Enum: beginning, end

No

end

Start reading logs from beginning or end of the file.

Parse

Boolean

No

true

Parses the log fields into structured data.

Examples

Collect PgBouncer logs from a non-default path

A PgBouncer instance writes its log to /opt/pgbouncer/logs/pgbouncer.log. This configuration reads that file, starts at the end so only new lines are collected, and parses each line into structured fields.

Configuration Tips

  • Set Start At to beginning the first time you want to backfill an existing log file; leave it at end to collect only new entries going forward.

  • Disable Parse if you want to forward the raw log line unmodified, for example when a downstream processor handles parsing.

  • Provide multiple paths under Log Paths to collect from more than one PgBouncer instance on the same host.

Troubleshooting

No logs are collected

Symptoms: the source is running but no log records arrive.

Solutions:

  1. Confirm PgBouncer is configured with a logfile and is actively writing to it.

  2. Verify the path in Log Paths matches the actual log file location and that the collector process has read permission on it.

  3. If the file already existed before the source started and you expect historical lines, set Start At to beginning.

Log lines arrive unparsed

Symptoms: records appear but fields are not broken out into structured data.

Solutions:

  1. Confirm Parse is enabled.

  2. Verify the log lines follow the standard PgBouncer log format; non-standard or custom formats may not parse cleanly.

Standalone Source

Last updated

Was this helpful?