Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save varun-dhawan/e86a6c18066c25fc9ca069503ee680d3 to your computer and use it in GitHub Desktop.
Save varun-dhawan/e86a6c18066c25fc9ca069503ee680d3 to your computer and use it in GitHub Desktop.

Revisions

  1. varun-dhawan revised this gist Feb 24, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion AzurePostgresFlexibleServer-PgBouncerMetrics.md
    Original file line number Diff line number Diff line change
    @@ -21,7 +21,7 @@ Azure Database for PostgreSQL – Flexible Server offers PgBouncer as a [built-i
    We are exposing 6 new metrics that customers can use to monitor PgBouncer performance and identify any potential issues. Each metric is emitted at a 1 minute frequency, and has up to 93 days of retenion. Customers can configure alerts on the metrics and can also access the new metrics dimensions, to split and filter the metrics data on database name.

    ## Enabling PgBouncer metrics
    * Most of these new metrics are **disabled** by default
    * PgBouncer metrics are **disabled** by default
    * For Pgbouncer metrics to work, server parameters `pgbouncer.enabled` and `metrics.pgbouncer_diagnostics` have to be enabled
    * These parameters are dynamic, and will not require instance restart.

  2. varun-dhawan revised this gist Feb 1, 2023. 1 changed file with 2 additions and 3 deletions.
    5 changes: 2 additions & 3 deletions AzurePostgresFlexibleServer-PgBouncerMetrics.md
    Original file line number Diff line number Diff line change
    @@ -22,9 +22,8 @@ We are exposing 6 new metrics that customers can use to monitor PgBouncer perfor

    ## Enabling PgBouncer metrics
    * Most of these new metrics are **disabled** by default
    * To enable these metrics, please turn ON the server parameter `metrics.pgbouncer_diagnostics`
    * This parameter is dynamic, and will not require instance restart.
    * For Pgbouncer metrics to work, the `pgbouncer.enabled` and `metrics.pgbouncer_diagnostics` have to be enabled
    * For Pgbouncer metrics to work, server parameters `pgbouncer.enabled` and `metrics.pgbouncer_diagnostics` have to be enabled
    * These parameters are dynamic, and will not require instance restart.

    ## List of PgBouncer metrics

  3. varun-dhawan revised this gist Feb 1, 2023. 1 changed file with 7 additions and 7 deletions.
    14 changes: 7 additions & 7 deletions AzurePostgresFlexibleServer-PgBouncerMetrics.md
    Original file line number Diff line number Diff line change
    @@ -18,7 +18,13 @@ PgBouncer probably the most popular connection pooler in postgrtes. It is a ligh

    Azure Database for PostgreSQL – Flexible Server offers PgBouncer as a [built-in option](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-pgbouncer#enabling-and-configuring-pgbouncer), wherein customers can easily enable PgBouncer from Azure Postgres server parameters and update the app connection string to talk to PgBouncer on port 6432, rather than directly to the database server.

    When using PgBouncer, it's important to monitor the performance of PgBouncer to ensure that it's functioning as expected and to identify any potential issues. Here are some key metrics to monitor when using PgBouncer with Azure Postgres Flexible Server:
    We are exposing 6 new metrics that customers can use to monitor PgBouncer performance and identify any potential issues. Each metric is emitted at a 1 minute frequency, and has up to 93 days of retenion. Customers can configure alerts on the metrics and can also access the new metrics dimensions, to split and filter the metrics data on database name.

    ## Enabling PgBouncer metrics
    * Most of these new metrics are **disabled** by default
    * To enable these metrics, please turn ON the server parameter `metrics.pgbouncer_diagnostics`
    * This parameter is dynamic, and will not require instance restart.
    * For Pgbouncer metrics to work, the `pgbouncer.enabled` and `metrics.pgbouncer_diagnostics` have to be enabled

    ## List of PgBouncer metrics

    @@ -30,12 +36,6 @@ When using PgBouncer, it's important to monitor the performance of PgBouncer to
    |**Idle server connections** (Preview) |server_connections_idle |Count|Connections to PostgreSQL that are idle, ready to service a new client connection |DatabaseName|No |
    |**Total pooled connections** (Preview) |total_pooled_connections |Count|Current number of pooled connections |DatabaseName|No |
    |**Number of connection pools** (Preview)|num_pools |Count|Total number of connection pools |DatabaseName|No |

    ## Enabling PgBouncer metrics
    * Most of these new metrics are **disabled** by default
    * To enable these metrics, please turn ON the server parameter `metrics.pgbouncer_diagnostics`
    * This parameter is dynamic, and will not require instance restart.
    * For Pgbouncer metrics to work, the `pgbouncer.enabled` and `metrics.pgbouncer_diagnostics` have to be enabled

    ## References
    * PgBouncer Admin Console - https://www.pgbouncer.org/usage.html
  4. varun-dhawan revised this gist Feb 1, 2023. 1 changed file with 8 additions and 8 deletions.
    16 changes: 8 additions & 8 deletions AzurePostgresFlexibleServer-PgBouncerMetrics.md
    Original file line number Diff line number Diff line change
    @@ -22,14 +22,14 @@ When using PgBouncer, it's important to monitor the performance of PgBouncer to

    ## List of PgBouncer metrics

    |Display Name |Metrics ID |Description |Dimension |Default enabled|
    |----------------------------------------|--------------------------|-------------------------------------------------------------------------------------|------------|---------------|
    |**Active client connections** (Preview) |client_connections_active |Connections from clients which are associated with a PostgreSQL connection |DatabaseName|No |
    |**Waiting client connections** (Preview)|client_connections_waiting|Connections from clients that are waiting for a PostgreSQL connection to service them|DatabaseName|No |
    |**Active server connections** (Preview) |server_connections_active |Connections to PostgreSQL that are in use by a client connection |DatabaseName|No |
    |**Idle server connections** (Preview) |server_connections_idle |Connections to PostgreSQL that are idle, ready to service a new client connection |DatabaseName|No |
    |**Total pooled connections** (Preview) |total_pooled_connections |Current number of pooled connections |DatabaseName|No |
    |**Number of connection pools** (Preview)|num_pools |Total number of connection pools |DatabaseName|No |
    |Display Name |Metrics ID |Unit |Description |Dimension |Default enabled|
    |----------------------------------------|--------------------------|-----|-------------------------------------------------------------------------------------|------------|---------------|
    |**Active client connections** (Preview) |client_connections_active |Count|Connections from clients which are associated with a PostgreSQL connection |DatabaseName|No |
    |**Waiting client connections** (Preview)|client_connections_waiting|Count|Connections from clients that are waiting for a PostgreSQL connection to service them|DatabaseName|No |
    |**Active server connections** (Preview) |server_connections_active |Count|Connections to PostgreSQL that are in use by a client connection |DatabaseName|No |
    |**Idle server connections** (Preview) |server_connections_idle |Count|Connections to PostgreSQL that are idle, ready to service a new client connection |DatabaseName|No |
    |**Total pooled connections** (Preview) |total_pooled_connections |Count|Current number of pooled connections |DatabaseName|No |
    |**Number of connection pools** (Preview)|num_pools |Count|Total number of connection pools |DatabaseName|No |

    ## Enabling PgBouncer metrics
    * Most of these new metrics are **disabled** by default
  5. varun-dhawan revised this gist Feb 1, 2023. 1 changed file with 8 additions and 8 deletions.
    16 changes: 8 additions & 8 deletions AzurePostgresFlexibleServer-PgBouncerMetrics.md
    Original file line number Diff line number Diff line change
    @@ -22,14 +22,14 @@ When using PgBouncer, it's important to monitor the performance of PgBouncer to

    ## List of PgBouncer metrics

    |Display Name |Metrics ID |Description |Dimension |Default enabled|
    |------------------------------------|--------------------------|-------------------------------------------------------------------------------------|------------|---------------|
    |Active client connections (Preview) |client_connections_active |Connections from clients which are associated with a PostgreSQL connection |DatabaseName|No |
    |Waiting client connections (Preview)|client_connections_waiting|Connections from clients that are waiting for a PostgreSQL connection to service them|DatabaseName|No |
    |Active server connections (Preview) |server_connections_active |Connections to PostgreSQL that are in use by a client connection |DatabaseName|No |
    |Idle server connections (Preview) |server_connections_idle |Connections to PostgreSQL that are idle, ready to service a new client connection |DatabaseName|No |
    |Total pooled connections (Preview) |total_pooled_connections |Current number of pooled connections |DatabaseName|No |
    |Number of connection pools (Preview)|num_pools |Total number of connection pools |DatabaseName|No |
    |Display Name |Metrics ID |Description |Dimension |Default enabled|
    |----------------------------------------|--------------------------|-------------------------------------------------------------------------------------|------------|---------------|
    |**Active client connections** (Preview) |client_connections_active |Connections from clients which are associated with a PostgreSQL connection |DatabaseName|No |
    |**Waiting client connections** (Preview)|client_connections_waiting|Connections from clients that are waiting for a PostgreSQL connection to service them|DatabaseName|No |
    |**Active server connections** (Preview) |server_connections_active |Connections to PostgreSQL that are in use by a client connection |DatabaseName|No |
    |**Idle server connections** (Preview) |server_connections_idle |Connections to PostgreSQL that are idle, ready to service a new client connection |DatabaseName|No |
    |**Total pooled connections** (Preview) |total_pooled_connections |Current number of pooled connections |DatabaseName|No |
    |**Number of connection pools** (Preview)|num_pools |Total number of connection pools |DatabaseName|No |

    ## Enabling PgBouncer metrics
    * Most of these new metrics are **disabled** by default
  6. varun-dhawan revised this gist Feb 1, 2023. 1 changed file with 8 additions and 8 deletions.
    16 changes: 8 additions & 8 deletions AzurePostgresFlexibleServer-PgBouncerMetrics.md
    Original file line number Diff line number Diff line change
    @@ -22,14 +22,14 @@ When using PgBouncer, it's important to monitor the performance of PgBouncer to

    ## List of PgBouncer metrics

    |Display Name |Metrics ID |Description |Dimension |Default enabled|Show command (optional)|
    |----------------|-------------------------------------|-------------------------------------------------------------------------------------|------------|---------------|-----------------------|
    |**cl_active** |pgbouncer.pools.cl_active |Connections from clients which are associated with a PostgreSQL connection |DatabaseName|No |SHOW POOLS |
    |**cl_waiting** |pgbouncer.pools.cl_waiting |Connections from clients that are waiting for a PostgreSQL connection to service them|DatabaseName|No |SHOW POOLS |
    |**sv_active** |pgbouncer.pools.sv_active |Connections to PostgreSQL that are in use by a client connection |DatabaseName|No |SHOW POOLS |
    |**sv_idle** |pgbouncer.pools.sv_idle |Connections to PostgreSQL that are idle, ready to service a new client connection |DatabaseName|No |SHOW POOLS |
    |**db_active** |pgbouncer.database.active_connections|Current number of connections for this database |DatabaseName|No |SHOW DATABASES |
    |**pools_by_db** |pgbouncer.pools.pools_per_database |Total number of pools per database |DatabaseName|No |CUSTOM METRICS |
    |Display Name |Metrics ID |Description |Dimension |Default enabled|
    |------------------------------------|--------------------------|-------------------------------------------------------------------------------------|------------|---------------|
    |Active client connections (Preview) |client_connections_active |Connections from clients which are associated with a PostgreSQL connection |DatabaseName|No |
    |Waiting client connections (Preview)|client_connections_waiting|Connections from clients that are waiting for a PostgreSQL connection to service them|DatabaseName|No |
    |Active server connections (Preview) |server_connections_active |Connections to PostgreSQL that are in use by a client connection |DatabaseName|No |
    |Idle server connections (Preview) |server_connections_idle |Connections to PostgreSQL that are idle, ready to service a new client connection |DatabaseName|No |
    |Total pooled connections (Preview) |total_pooled_connections |Current number of pooled connections |DatabaseName|No |
    |Number of connection pools (Preview)|num_pools |Total number of connection pools |DatabaseName|No |

    ## Enabling PgBouncer metrics
    * Most of these new metrics are **disabled** by default
  7. varun-dhawan revised this gist Feb 1, 2023. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions AzurePostgresFlexibleServer-PgBouncerMetrics.md
    Original file line number Diff line number Diff line change
    @@ -35,6 +35,7 @@ When using PgBouncer, it's important to monitor the performance of PgBouncer to
    * Most of these new metrics are **disabled** by default
    * To enable these metrics, please turn ON the server parameter `metrics.pgbouncer_diagnostics`
    * This parameter is dynamic, and will not require instance restart.
    * For Pgbouncer metrics to work, the `pgbouncer.enabled` and `metrics.pgbouncer_diagnostics` have to be enabled

    ## References
    * PgBouncer Admin Console - https://www.pgbouncer.org/usage.html
  8. varun-dhawan revised this gist Feb 1, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion AzurePostgresFlexibleServer-PgBouncerMetrics.md
    Original file line number Diff line number Diff line change
    @@ -33,7 +33,7 @@ When using PgBouncer, it's important to monitor the performance of PgBouncer to

    ## Enabling PgBouncer metrics
    * Most of these new metrics are **disabled** by default
    * To enable these metrics, please turn ON the server parameter `pgbouncer.diagnostics`.
    * To enable these metrics, please turn ON the server parameter `metrics.pgbouncer_diagnostics`
    * This parameter is dynamic, and will not require instance restart.

    ## References
  9. varun-dhawan revised this gist Jan 31, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion AzurePostgresFlexibleServer-PgBouncerMetrics.md
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ ms.author: varun.dhawan
    ms.date: 11/01/2022
    ---

    # Azure Postgres Flexible Server - PgBouncer metrics (Preview) [Zn Sem]
    # Azure Postgres Flexible Server - PgBouncer metrics (Preview)

    ## PgBouncer monitoring

  10. varun-dhawan revised this gist Jan 31, 2023. 1 changed file with 8 additions and 8 deletions.
    16 changes: 8 additions & 8 deletions AzurePostgresFlexibleServer-PgBouncerMetrics.md
    Original file line number Diff line number Diff line change
    @@ -22,14 +22,14 @@ When using PgBouncer, it's important to monitor the performance of PgBouncer to

    ## List of PgBouncer metrics

    |Display Name|Metrics ID |Description |Dimension |Default enabled|Show command (optional)|
    |------------|-------------------------------------|-------------------------------------------------------------------------------------|------------|---------------|-----------------------|
    |cl_active |pgbouncer.pools.cl_active |Connections from clients which are associated with a PostgreSQL connection |DatabaseName|No |SHOW POOLS |
    |cl_waiting |pgbouncer.pools.cl_waiting |Connections from clients that are waiting for a PostgreSQL connection to service them|DatabaseName|No |SHOW POOLS |
    |sv_active |pgbouncer.pools.sv_active |Connections to PostgreSQL that are in use by a client connection |DatabaseName|No |SHOW POOLS |
    |sv_idle |pgbouncer.pools.sv_idle |Connections to PostgreSQL that are idle, ready to service a new client connection |DatabaseName|No |SHOW POOLS |
    |db_active |pgbouncer.database.active_connections|Current number of connections for this database |DatabaseName|No |SHOW DATABASES |
    |pools_by_db |pgbouncer.pools.pools_per_database |Total number of pools per database |DatabaseName|No |CUSTOM METRICS |
    |Display Name |Metrics ID |Description |Dimension |Default enabled|Show command (optional)|
    |----------------|-------------------------------------|-------------------------------------------------------------------------------------|------------|---------------|-----------------------|
    |**cl_active** |pgbouncer.pools.cl_active |Connections from clients which are associated with a PostgreSQL connection |DatabaseName|No |SHOW POOLS |
    |**cl_waiting** |pgbouncer.pools.cl_waiting |Connections from clients that are waiting for a PostgreSQL connection to service them|DatabaseName|No |SHOW POOLS |
    |**sv_active** |pgbouncer.pools.sv_active |Connections to PostgreSQL that are in use by a client connection |DatabaseName|No |SHOW POOLS |
    |**sv_idle** |pgbouncer.pools.sv_idle |Connections to PostgreSQL that are idle, ready to service a new client connection |DatabaseName|No |SHOW POOLS |
    |**db_active** |pgbouncer.database.active_connections|Current number of connections for this database |DatabaseName|No |SHOW DATABASES |
    |**pools_by_db** |pgbouncer.pools.pools_per_database |Total number of pools per database |DatabaseName|No |CUSTOM METRICS |

    ## Enabling PgBouncer metrics
    * Most of these new metrics are **disabled** by default
  11. varun-dhawan revised this gist Jan 31, 2023. 1 changed file with 9 additions and 8 deletions.
    17 changes: 9 additions & 8 deletions AzurePostgresFlexibleServer-PgBouncerMetrics.md
    Original file line number Diff line number Diff line change
    @@ -21,14 +21,15 @@ Azure Database for PostgreSQL – Flexible Server offers PgBouncer as a [built-i
    When using PgBouncer, it's important to monitor the performance of PgBouncer to ensure that it's functioning as expected and to identify any potential issues. Here are some key metrics to monitor when using PgBouncer with Azure Postgres Flexible Server:

    ## List of PgBouncer metrics
    |Metrics ID |Display Name|Description |Dimension |Show command (optional)|
    |-------------------------------------|------------|-------------------------------------------------------------------------------------|------------|-----------------------|
    |pgbouncer.pools.cl_active |cl_active |Connections from clients which are associated with a PostgreSQL connection |DatabaseName|SHOW POOLS |
    |pgbouncer.pools.cl_waiting |cl_waiting |Connections from clients that are waiting for a PostgreSQL connection to service them|DatabaseName|SHOW POOLS |
    |pgbouncer.pools.sv_active |sv_active |Connections to PostgreSQL that are in use by a client connection |DatabaseName|SHOW POOLS |
    |pgbouncer.pools.sv_idle |sv_idle |Connections to PostgreSQL that are idle, ready to service a new client connection |DatabaseName|SHOW POOLS |
    |pgbouncer.database.active_connections|db_active |Current number of connections for this database |DatabaseName|SHOW DATABASES |
    |pgbouncer.pools.pools_per_database |pools_by_db |Total number of pools per database |DatabaseName|CUSTOM METRICS |

    |Display Name|Metrics ID |Description |Dimension |Default enabled|Show command (optional)|
    |------------|-------------------------------------|-------------------------------------------------------------------------------------|------------|---------------|-----------------------|
    |cl_active |pgbouncer.pools.cl_active |Connections from clients which are associated with a PostgreSQL connection |DatabaseName|No |SHOW POOLS |
    |cl_waiting |pgbouncer.pools.cl_waiting |Connections from clients that are waiting for a PostgreSQL connection to service them|DatabaseName|No |SHOW POOLS |
    |sv_active |pgbouncer.pools.sv_active |Connections to PostgreSQL that are in use by a client connection |DatabaseName|No |SHOW POOLS |
    |sv_idle |pgbouncer.pools.sv_idle |Connections to PostgreSQL that are idle, ready to service a new client connection |DatabaseName|No |SHOW POOLS |
    |db_active |pgbouncer.database.active_connections|Current number of connections for this database |DatabaseName|No |SHOW DATABASES |
    |pools_by_db |pgbouncer.pools.pools_per_database |Total number of pools per database |DatabaseName|No |CUSTOM METRICS |

    ## Enabling PgBouncer metrics
    * Most of these new metrics are **disabled** by default
  12. varun-dhawan revised this gist Jan 31, 2023. 1 changed file with 8 additions and 9 deletions.
    17 changes: 8 additions & 9 deletions AzurePostgresFlexibleServer-PgBouncerMetrics.md
    Original file line number Diff line number Diff line change
    @@ -21,15 +21,14 @@ Azure Database for PostgreSQL – Flexible Server offers PgBouncer as a [built-i
    When using PgBouncer, it's important to monitor the performance of PgBouncer to ensure that it's functioning as expected and to identify any potential issues. Here are some key metrics to monitor when using PgBouncer with Azure Postgres Flexible Server:

    ## List of PgBouncer metrics

    |Metrics ID |Description |SHOW commands |Dimension |Status |
    |-------------------------------------|--------------------------------------------------------------------------|--------------|------------|---------------|
    |pgbouncer.pools.cl_active |Client connections linked to server connection and able to process queries|SHOW POOLS |DatabaseName|Committed (M26)|
    |pgbouncer.pools.cl_waiting |Client connections waiting on a server connection |SHOW POOLS |DatabaseName|Committed (M26)|
    |pgbouncer.pools.sv_active |Server connections linked to a client connection |SHOW POOLS |DatabaseName|Committed (M26)|
    |pgbouncer.pools.sv_idle |Server connections idle and ready for a client query |SHOW POOLS |DatabaseName|Committed (M26)|
    |pgbouncer.database.active_connections|Current number of connections (client-2-pgBouncer) |SHOW DATABASES|DatabaseName|Committed (M26)|
    |pgbouncer.pools.pools_per_database |Total no. of pools per DB |CUSTOM METRICS|DatabaseName|Committed (M26)|
    |Metrics ID |Display Name|Description |Dimension |Show command (optional)|
    |-------------------------------------|------------|-------------------------------------------------------------------------------------|------------|-----------------------|
    |pgbouncer.pools.cl_active |cl_active |Connections from clients which are associated with a PostgreSQL connection |DatabaseName|SHOW POOLS |
    |pgbouncer.pools.cl_waiting |cl_waiting |Connections from clients that are waiting for a PostgreSQL connection to service them|DatabaseName|SHOW POOLS |
    |pgbouncer.pools.sv_active |sv_active |Connections to PostgreSQL that are in use by a client connection |DatabaseName|SHOW POOLS |
    |pgbouncer.pools.sv_idle |sv_idle |Connections to PostgreSQL that are idle, ready to service a new client connection |DatabaseName|SHOW POOLS |
    |pgbouncer.database.active_connections|db_active |Current number of connections for this database |DatabaseName|SHOW DATABASES |
    |pgbouncer.pools.pools_per_database |pools_by_db |Total number of pools per database |DatabaseName|CUSTOM METRICS |

    ## Enabling PgBouncer metrics
    * Most of these new metrics are **disabled** by default
  13. varun-dhawan revised this gist Jan 23, 2023. No changes.
  14. varun-dhawan revised this gist Jan 23, 2023. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion AzurePostgresFlexibleServer-PgBouncerMetrics.md
    Original file line number Diff line number Diff line change
    @@ -16,7 +16,8 @@ Postgres is a powerful and popular open-source relational database management sy

    PgBouncer probably the most popular connection pooler in postgrtes. It is a lightweight connection pooler that helps to improve the performance and scalability of your Postgres databases by managing and reusing database connections. By pooling connections, PgBouncer reduces the number of connections that need to be opened and closed, reducing the load on your Postgres server and improving overall performance.

    Azure Database for PostgreSQL – Flexible Server offers PgBouncer as a [built-in option](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-pgbouncer#enabling-and-configuring-pgbouncer), where customers can easily enable PgBouncer from server parameters and update your app connection string to talk to PgBouncer on port 6432, rather than directly to the database server.
    Azure Database for PostgreSQL – Flexible Server offers PgBouncer as a [built-in option](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-pgbouncer#enabling-and-configuring-pgbouncer), wherein customers can easily enable PgBouncer from Azure Postgres server parameters and update the app connection string to talk to PgBouncer on port 6432, rather than directly to the database server.

    When using PgBouncer, it's important to monitor the performance of PgBouncer to ensure that it's functioning as expected and to identify any potential issues. Here are some key metrics to monitor when using PgBouncer with Azure Postgres Flexible Server:

    ## List of PgBouncer metrics
  15. varun-dhawan revised this gist Jan 23, 2023. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions AzurePostgresFlexibleServer-PgBouncerMetrics.md
    Original file line number Diff line number Diff line change
    @@ -14,9 +14,9 @@ ms.date: 11/01/2022

    Postgres is a powerful and popular open-source relational database management system (RDBMS). However, as the number of connections to a Postgres database grows, managing and monitoring those connections can become a challenge. That's where connection pooling comes in.

    PgBouncer probably the most popular connection pooler in postgrtes. It is a lightweight connection pooler that helps to improve the performance and scalability of your Azure Postgres databases by managing and reusing database connections. By pooling connections, PgBouncer reduces the number of connections that need to be opened and closed, reducing the load on your Postgres server and improving overall performance.
    PgBouncer probably the most popular connection pooler in postgrtes. It is a lightweight connection pooler that helps to improve the performance and scalability of your Postgres databases by managing and reusing database connections. By pooling connections, PgBouncer reduces the number of connections that need to be opened and closed, reducing the load on your Postgres server and improving overall performance.

    Azure Database for PostgreSQL – Flexible Server offers PgBouncer as a built-in option, where customers can easily enable PgBouncer from server parameters and update your app connection string to talk to PgBouncer on port 6432, rather than directly to the database server.
    Azure Database for PostgreSQL – Flexible Server offers PgBouncer as a [built-in option](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-pgbouncer#enabling-and-configuring-pgbouncer), where customers can easily enable PgBouncer from server parameters and update your app connection string to talk to PgBouncer on port 6432, rather than directly to the database server.
    When using PgBouncer, it's important to monitor the performance of PgBouncer to ensure that it's functioning as expected and to identify any potential issues. Here are some key metrics to monitor when using PgBouncer with Azure Postgres Flexible Server:

    ## List of PgBouncer metrics
  16. varun-dhawan revised this gist Jan 23, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion AzurePostgresFlexibleServer-PgBouncerMetrics.md
    Original file line number Diff line number Diff line change
    @@ -14,7 +14,7 @@ ms.date: 11/01/2022

    Postgres is a powerful and popular open-source relational database management system (RDBMS). However, as the number of connections to a Postgres database grows, managing and monitoring those connections can become a challenge. That's where connection pooling comes in.

    PgBouncer probably the most popular connection pooler in postgrtes. It is a lightweight connection pooler for Postgres that helps to improve the performance and scalability of your Postgres databases by managing and reusing database connections. By pooling connections, PgBouncer reduces the number of connections that need to be opened and closed, reducing the load on your Postgres server and improving overall performance.
    PgBouncer probably the most popular connection pooler in postgrtes. It is a lightweight connection pooler that helps to improve the performance and scalability of your Azure Postgres databases by managing and reusing database connections. By pooling connections, PgBouncer reduces the number of connections that need to be opened and closed, reducing the load on your Postgres server and improving overall performance.

    Azure Database for PostgreSQL – Flexible Server offers PgBouncer as a built-in option, where customers can easily enable PgBouncer from server parameters and update your app connection string to talk to PgBouncer on port 6432, rather than directly to the database server.
    When using PgBouncer, it's important to monitor the performance of PgBouncer to ensure that it's functioning as expected and to identify any potential issues. Here are some key metrics to monitor when using PgBouncer with Azure Postgres Flexible Server:
  17. varun-dhawan revised this gist Jan 23, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion AzurePostgresFlexibleServer-PgBouncerMetrics.md
    Original file line number Diff line number Diff line change
    @@ -14,7 +14,7 @@ ms.date: 11/01/2022

    Postgres is a powerful and popular open-source relational database management system (RDBMS). However, as the number of connections to a Postgres database grows, managing and monitoring those connections can become a challenge. That's where connection pooling comes in.

    PgBouncer is a lightweight connection pooler for Postgres that helps to improve the performance and scalability of your Postgres databases by managing and reusing database connections. By pooling connections, PgBouncer reduces the number of connections that need to be opened and closed, reducing the load on your Postgres server and improving overall performance.
    PgBouncer probably the most popular connection pooler in postgrtes. It is a lightweight connection pooler for Postgres that helps to improve the performance and scalability of your Postgres databases by managing and reusing database connections. By pooling connections, PgBouncer reduces the number of connections that need to be opened and closed, reducing the load on your Postgres server and improving overall performance.

    Azure Database for PostgreSQL – Flexible Server offers PgBouncer as a built-in option, where customers can easily enable PgBouncer from server parameters and update your app connection string to talk to PgBouncer on port 6432, rather than directly to the database server.
    When using PgBouncer, it's important to monitor the performance of PgBouncer to ensure that it's functioning as expected and to identify any potential issues. Here are some key metrics to monitor when using PgBouncer with Azure Postgres Flexible Server:
  18. varun-dhawan revised this gist Jan 23, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion AzurePostgresFlexibleServer-PgBouncerMetrics.md
    Original file line number Diff line number Diff line change
    @@ -12,7 +12,7 @@ ms.date: 11/01/2022

    ## PgBouncer monitoring

    Postgres is a powerful and popular open-source relational database management system (RDBMS). However, as the number of connections to a Postgres database grows, managing and monitoring those connections can become a challenge. That's where PgBouncer comes in.
    Postgres is a powerful and popular open-source relational database management system (RDBMS). However, as the number of connections to a Postgres database grows, managing and monitoring those connections can become a challenge. That's where connection pooling comes in.

    PgBouncer is a lightweight connection pooler for Postgres that helps to improve the performance and scalability of your Postgres databases by managing and reusing database connections. By pooling connections, PgBouncer reduces the number of connections that need to be opened and closed, reducing the load on your Postgres server and improving overall performance.

  19. varun-dhawan revised this gist Jan 23, 2023. 1 changed file with 6 additions and 9 deletions.
    15 changes: 6 additions & 9 deletions AzurePostgresFlexibleServer-PgBouncerMetrics.md
    Original file line number Diff line number Diff line change
    @@ -19,13 +19,6 @@ PgBouncer is a lightweight connection pooler for Postgres that helps to improve
    Azure Database for PostgreSQL – Flexible Server offers PgBouncer as a built-in option, where customers can easily enable PgBouncer from server parameters and update your app connection string to talk to PgBouncer on port 6432, rather than directly to the database server.
    When using PgBouncer, it's important to monitor the performance of PgBouncer to ensure that it's functioning as expected and to identify any potential issues. Here are some key metrics to monitor when using PgBouncer with Azure Postgres Flexible Server:



    ## Enabling PgBouncer metrics
    * Most of these new metrics are **disabled** by default
    * To enable these metrics, please turn ON the server parameter `pgbouncer.diagnostics`.
    * This parameter is dynamic, and will not require instance restart.

    ## List of PgBouncer metrics

    |Metrics ID |Description |SHOW commands |Dimension |Status |
    @@ -37,8 +30,12 @@ When using PgBouncer, it's important to monitor the performance of PgBouncer to
    |pgbouncer.database.active_connections|Current number of connections (client-2-pgBouncer) |SHOW DATABASES|DatabaseName|Committed (M26)|
    |pgbouncer.pools.pools_per_database |Total no. of pools per DB |CUSTOM METRICS|DatabaseName|Committed (M26)|


    ## Reference
    ## Enabling PgBouncer metrics
    * Most of these new metrics are **disabled** by default
    * To enable these metrics, please turn ON the server parameter `pgbouncer.diagnostics`.
    * This parameter is dynamic, and will not require instance restart.

    ## References
    * PgBouncer Admin Console - https://www.pgbouncer.org/usage.html

    ## Team
  20. varun-dhawan revised this gist Jan 23, 2023. No changes.
  21. varun-dhawan revised this gist Jan 23, 2023. 1 changed file with 0 additions and 5 deletions.
    5 changes: 0 additions & 5 deletions AzurePostgresFlexibleServer-PgBouncerMetrics.md
    Original file line number Diff line number Diff line change
    @@ -19,12 +19,7 @@ PgBouncer is a lightweight connection pooler for Postgres that helps to improve
    Azure Database for PostgreSQL – Flexible Server offers PgBouncer as a built-in option, where customers can easily enable PgBouncer from server parameters and update your app connection string to talk to PgBouncer on port 6432, rather than directly to the database server.
    When using PgBouncer, it's important to monitor the performance of PgBouncer to ensure that it's functioning as expected and to identify any potential issues. Here are some key metrics to monitor when using PgBouncer with Azure Postgres Flexible Server:

    PgBouncer also provides an internal database that you can connect to called pgbouncer. Once connected to the database you can execute SHOW commands that provide information on the current state of pgbouncer.

    * **SHOW HELP** - list all the available show commands
    * **SHOW POOLS** — show number of connections in each state for each pool
    * **SHOW DATABASES** - show current applied connection limits for each database
    * **SHOW STATS** - show stats on requests and traffic for every database

    ## Enabling PgBouncer metrics
    * Most of these new metrics are **disabled** by default
  22. varun-dhawan revised this gist Jan 23, 2023. 1 changed file with 6 additions and 1 deletion.
    7 changes: 6 additions & 1 deletion AzurePostgresFlexibleServer-PgBouncerMetrics.md
    Original file line number Diff line number Diff line change
    @@ -12,7 +12,12 @@ ms.date: 11/01/2022

    ## PgBouncer monitoring

    PgBouncer is an open-source, lightweight, single-binary connection pooler for PostgreSQL. It can pool connections to one or more databases (on possibly different servers) and serve clients over TCP and Unix domain sockets. Azure Database for PostgreSQL – Flexible Server offers PgBouncer as a built-in connection pooling solution.
    Postgres is a powerful and popular open-source relational database management system (RDBMS). However, as the number of connections to a Postgres database grows, managing and monitoring those connections can become a challenge. That's where PgBouncer comes in.

    PgBouncer is a lightweight connection pooler for Postgres that helps to improve the performance and scalability of your Postgres databases by managing and reusing database connections. By pooling connections, PgBouncer reduces the number of connections that need to be opened and closed, reducing the load on your Postgres server and improving overall performance.

    Azure Database for PostgreSQL – Flexible Server offers PgBouncer as a built-in option, where customers can easily enable PgBouncer from server parameters and update your app connection string to talk to PgBouncer on port 6432, rather than directly to the database server.
    When using PgBouncer, it's important to monitor the performance of PgBouncer to ensure that it's functioning as expected and to identify any potential issues. Here are some key metrics to monitor when using PgBouncer with Azure Postgres Flexible Server:

    PgBouncer also provides an internal database that you can connect to called pgbouncer. Once connected to the database you can execute SHOW commands that provide information on the current state of pgbouncer.

  23. varun-dhawan revised this gist Jan 18, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion AzurePostgresFlexibleServer-PgBouncerMetrics.md
    Original file line number Diff line number Diff line change
    @@ -43,4 +43,4 @@ PgBouncer also provides an internal database that you can connect to called pgbo

    ## Team
    * Engineering - [email protected], [email protected]
    * Product - varun.dhawan@microsoft.com, [email protected]
    * Product - Varun.Dhawan@microsoft.com, [email protected]
  24. varun-dhawan revised this gist Jan 18, 2023. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions AzurePostgresFlexibleServer-PgBouncerMetrics.md
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,8 @@ ms.date: 11/01/2022

    # Azure Postgres Flexible Server - PgBouncer metrics (Preview) [Zn Sem]

    ## PgBouncer monitoring

    PgBouncer is an open-source, lightweight, single-binary connection pooler for PostgreSQL. It can pool connections to one or more databases (on possibly different servers) and serve clients over TCP and Unix domain sockets. Azure Database for PostgreSQL – Flexible Server offers PgBouncer as a built-in connection pooling solution.

    PgBouncer also provides an internal database that you can connect to called pgbouncer. Once connected to the database you can execute SHOW commands that provide information on the current state of pgbouncer.
  25. varun-dhawan revised this gist Jan 18, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion AzurePostgresFlexibleServer-PgBouncerMetrics.md
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@ description: Metrics to monitor PgBouncer
    ms.service: postgresql
    ms.subservice: flexible-server
    ms.topic: conceptual
    ms.author: varundhawan
    ms.author: varun.dhawan
    ms.date: 11/01/2022
    ---

  26. varun-dhawan revised this gist Jan 18, 2023. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions AzurePostgresFlexibleServer-PgBouncerMetrics.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    ---
    title: Azure Database for PostgreSQL Flexible Server - PgBouncer Metrics (Preview)
    title: Azure Database for PostgreSQL Flexible Server - PgBouncer metrics (Preview)
    description: Metrics to monitor PgBouncer
    ms.service: postgresql
    ms.subservice: flexible-server
    @@ -8,7 +8,7 @@ ms.author: varundhawan
    ms.date: 11/01/2022
    ---

    # Azure Postgres Flexible Server - PgBouncer Metrics (Preview) [Zn Sem]
    # Azure Postgres Flexible Server - PgBouncer metrics (Preview) [Zn Sem]

    PgBouncer is an open-source, lightweight, single-binary connection pooler for PostgreSQL. It can pool connections to one or more databases (on possibly different servers) and serve clients over TCP and Unix domain sockets. Azure Database for PostgreSQL – Flexible Server offers PgBouncer as a built-in connection pooling solution.

  27. varun-dhawan revised this gist Jan 18, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion AzurePostgresFlexibleServer-PgBouncerMetrics.md
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ ms.author: varundhawan
    ms.date: 11/01/2022
    ---

    # Azure Database for PostgreSQL Flexible Server - PgBouncer Metrics (Preview) [Zn Sem]
    # Azure Postgres Flexible Server - PgBouncer Metrics (Preview) [Zn Sem]

    PgBouncer is an open-source, lightweight, single-binary connection pooler for PostgreSQL. It can pool connections to one or more databases (on possibly different servers) and serve clients over TCP and Unix domain sockets. Azure Database for PostgreSQL – Flexible Server offers PgBouncer as a built-in connection pooling solution.

  28. varun-dhawan revised this gist Jan 18, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion AzurePostgresFlexibleServer-PgBouncerMetrics.md
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ ms.author: varundhawan
    ms.date: 11/01/2022
    ---

    # Azure Database for PostgreSQL Flexible Server - PgBouncer Metrics (Preview)
    # Azure Database for PostgreSQL Flexible Server - PgBouncer Metrics (Preview) [Zn Sem]

    PgBouncer is an open-source, lightweight, single-binary connection pooler for PostgreSQL. It can pool connections to one or more databases (on possibly different servers) and serve clients over TCP and Unix domain sockets. Azure Database for PostgreSQL – Flexible Server offers PgBouncer as a built-in connection pooling solution.

  29. varun-dhawan revised this gist Jan 18, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion AzurePostgresFlexibleServer-PgBouncerMetrics.md
    Original file line number Diff line number Diff line change
    @@ -24,7 +24,7 @@ PgBouncer also provides an internal database that you can connect to called pgbo
    * To enable these metrics, please turn ON the server parameter `pgbouncer.diagnostics`.
    * This parameter is dynamic, and will not require instance restart.

    ## PgBouncer Metrics
    ## List of PgBouncer metrics

    |Metrics ID |Description |SHOW commands |Dimension |Status |
    |-------------------------------------|--------------------------------------------------------------------------|--------------|------------|---------------|
  30. varun-dhawan revised this gist Jan 18, 2023. 1 changed file with 9 additions and 8 deletions.
    17 changes: 9 additions & 8 deletions AzurePostgresFlexibleServer-PgBouncerMetrics.md
    Original file line number Diff line number Diff line change
    @@ -26,14 +26,15 @@ PgBouncer also provides an internal database that you can connect to called pgbo

    ## PgBouncer Metrics

    |Srno|Metrics |Desc |SHOW commands |Dimension (limit 50)|Status |
    |----|-------------------------------------|--------------------------------------------------------------------------|--------------|--------------------|---------|
    |1 |`pgbouncer.pools.cl_active` |Client connections linked to server connection and able to process queries|SHOW POOLS |Per database |Committed (M26)|
    |2 |`pgbouncer.pools.cl_waiting` |Client connections waiting on a server connection |SHOW POOLS |Per database |Committed (M26)|
    |3 |`pgbouncer.pools.sv_active` |Server connections linked to a client connection |SHOW POOLS |Per database |Committed (M26)|
    |4 |`pgbouncer.pools.sv_idle` |Server connections idle and ready for a client query |SHOW POOLS |Per database |Committed (M26)|
    |5 |`pgbouncer.database.active_connections`|Current number of connections (client-2-pgBouncer) |SHOW DATABASES|Per database |Committed (M26)|
    |6 |`pgbouncer.pools.pools_per_database` |Total no. of pools per DB |CUSTOM METRICS|Per database |Committed (M26)|
    |Metrics ID |Description |SHOW commands |Dimension |Status |
    |-------------------------------------|--------------------------------------------------------------------------|--------------|------------|---------------|
    |pgbouncer.pools.cl_active |Client connections linked to server connection and able to process queries|SHOW POOLS |DatabaseName|Committed (M26)|
    |pgbouncer.pools.cl_waiting |Client connections waiting on a server connection |SHOW POOLS |DatabaseName|Committed (M26)|
    |pgbouncer.pools.sv_active |Server connections linked to a client connection |SHOW POOLS |DatabaseName|Committed (M26)|
    |pgbouncer.pools.sv_idle |Server connections idle and ready for a client query |SHOW POOLS |DatabaseName|Committed (M26)|
    |pgbouncer.database.active_connections|Current number of connections (client-2-pgBouncer) |SHOW DATABASES|DatabaseName|Committed (M26)|
    |pgbouncer.pools.pools_per_database |Total no. of pools per DB |CUSTOM METRICS|DatabaseName|Committed (M26)|


    ## Reference
    * PgBouncer Admin Console - https://www.pgbouncer.org/usage.html