Monitor pgbouncer on Azure PostgreSQL Flexible Server

psvo 21 Reputation points
2022-09-27T13:22:51.83+00:00

I'd like to create an Azure alert to monitor the pgBouncer process on PostgreSQL flexible servers and alert if the process is down.

I believe port 6432 is used by pgBouncer, so monitoring if that port is up or not might be one way to do it. Unfortunately, I haven't figured out how that could be done either.

I'd greatly appreciate any suggestions.

Thanks,
Peter

Azure Database for PostgreSQL
{count} votes

Accepted answer
  1. GeethaThatipatri-MSFT 27,022 Reputation points Microsoft Employee
    2022-09-29T17:50:22.673+00:00

    Hi @psvo There is no direct metric that can help us to create an alert for PgBouncer.
    There are 2 things that can be tried

    1. Azure Network Watcher connection monitor. as mentioned by @Maxim Sergeev This can be used to monitor the port 6432
    2. We can try creating the query and that can run in Azure diagnostics. The query can run on a regular basis and will generate an alert when the connection to PgBouncer is failing.

    Please let me know if you need any further information.

    Regards
    Geetha


2 additional answers

Sort by: Most helpful
  1. Maxim Sergeev 6,566 Reputation points Microsoft Employee
    2022-09-28T00:11:14.083+00:00

    Hi there,

    Azure Network Watcher Connection Monitor is a most right solution to monitor ports.
    https://learn.microsoft.com/en-us/azure/network-watcher/connection-monitor-overview#create-a-connection-monitor

    This is an example how the Connection Monitor does the monitoring, including a latency and a test measurement
    245333-image.png


  2. Varun Dhawan 0 Reputation points Microsoft Employee
    2023-03-22T03:39:14.6366667+00:00

    We recently release PgBouncer monitoring metrics for Azure PostgreSQL Flexible Server.

    https://techcommunity.microsoft.com/t5/azure-database-for-postgresql/monitoring-pgbouncer-in-azure-postgresql-flexible-server/ba-p/3762146

    These metrics can be used to monitor health of connection pooling.

    0 comments No comments