Monitor PgBouncer with Datadog
Integrate PgBouncer with Datadog to track connection pool metrics and monitor application traffic on the Datadog platform.
Prerequisites
- Your service plan is Startup or higher.
- You applied outstanding service maintenance updates affecting the Datadog Metrics integration.
Enable monitoring
You can enable monitoring PgBouncer metrics for your Aiven for PostgreSQL service both if the service already has a Datadog Metrics integration and if it doesn't.
Enable monitoring for an integrated service
Enable monitoring PgBouncer metrics for an Aiven for PostgreSQL service that already has a Datadog Metrics integration:
-
Obtain the
SERVICE_INTEGRATION_ID
of the Datadog Metrics integration for your Aiven for PostgreSQL service by running the avn service integration-list command:avn service integration-list SERVICE_NAME \
--project PROJECT_NAME -
To enable PgBouncer monitoring in Datadog, set up the
datadog_pgbouncer_enabled
parameter totrue
:avn service integration-update SERVICE_INTEGRATION_ID \
--project PROJECT_NAME \
--user-config '{"datadog_pgbouncer_enabled": true}'Replace SERVICE_INTEGRATION_ID with the service integration identifier acquired in the preceding step.
Enable monitoring for a non-integrated service
To enable monitoring PgBouncer metrics for an Aiven for PostgreSQL service that doesn't have a Datadog Metrics integration, create the integration and enable monitoring by running:
avn service integration-create INTEGRATION_CREATE_PARAMETERS \
--user-config-json '{"datadog_pgbouncer_enabled": true}'
Replace INTEGRATION_CREATE_PARAMETERS with the parameters required to create the Datadog Metrics integration.
Verify the changes
Check that the datadog_pgbouncer_enabled
user-config is set correctly:
avn service integration-list SERVICE_NAME \
--project PROJECT_NAME \
--json | jq '.[] | select(.integration_type=="datadog").user_config'
Expect the following output confirming that datadog_pgbouncer_enabled
is set to
true
:
{
"datadog_pgbouncer_enabled": true
}