The PgBouncer check tracks connection pool metrics and lets you monitor traffic to and from your application.
The PgBouncer check is included in the Datadog Agent package, so you don't need to install anything else on your PgBouncer nodes.
Edit the pgbouncer.d/conf.yaml file, in the conf.d/ folder at the root of your Agent's configuration directory. See the sample pgbouncer.d/conf.yaml for all available configuration options:
init_config:
instances:
- host: localhost
port: 15433
username: <YOUR_USERNAME>
password: <YOUR_PASSWORD>
# tags:
# - env:prod
# Note: when the instance is configured with `database_url`, `host`, `port`, `username` and `password` are ignored.
- database_url: postgresql://<DB_USER>:<DB_PASS>@<DB_HOST>:<DB_PORT>/dbname?sslmode=require
# tags:
# - role:main
Note: database_url parameter value should point to PgBouncer stats database.
In your PgBouncer userlist.txt file add
"datadog" "<your_pass>"
Next, in your PgBouncer pgbouncer.ini file add
stats_users = datadog
Restart the Agent to start sending PgBouncer metrics to Datadog.
Run the Agent's status subcommand and look for pgbouncer under the Checks section.
See metadata.csv for a list of metrics provided by this check.
Note: Not all metrics are available with all versions of PgBouncer.
The PgBouncer check does not include any events.
pgbouncer.can_connect:
Returns CRITICAL if the Agent cannot connect to PgBouncer to collect metrics, otherwise OK.
Need help? Contact Datadog support.