--- title: Azure Database for PostgreSQL Flexible Server - DB-is-Alive metric (Preview) description: Metrics to monitor database availability ms.service: postgresql ms.subservice: flexible-server ms.topic: conceptual ms.author: varun.dhawan ms.date: 1/1/2023 --- # Azure Postgres Flexible Server - DB-is-Alive metric (Preview) ## Database availability metric DB-is-Alive is database availability metric for Azure Postgres Flexible Server. DB-is-Alive is azure monitor (MDM) metric that is emitted as a boolen `[1 for available]` and `[0 for not-available]`. The metric are emitted by a seperate background process, and is emitted every 20 seconds. Azure monitor will aggregate this metric every one minute. Aggregating this data with a `MAX()` aggregation will allow to correctly determine the health of the database in last one minute. For example: 1. If the database remains continuously unavailable for 1 mins then [`0 = not-available`] will be sent to Azure monitor. 1. If however the database auto recovers within 60s, then [`1 = available`] will be sent to Azure monitor. Customers can further aggergate these metric with any desired frequency to avoid any false positives. |Display Name |Metric ID |Unit |Description |Dimension |Default enabled| |-------------------------------------------------|-------------------------------|-------|--------------------------------------------------------------------------------------------------------|------------|---------------| |**Database Is Alive** (Preview) |is_db_alive |Boolean|Indicates if the database is up or not |N/a |Yes | ## Architecture * DB-is-Alive check is executed by an independent background processes to monitor the inatnce health. * This background process is child proces for postmaster ## Scope * Stand-alone servers * Replica servers in read-replica configuration ## Enabling DB-is-Alive metrics * DB-is-Alive metrics is enabled by default ## Team * Engineering - Sandrana.Hemanth@microsoft.com; Sergiu.Ernu@microsoft.com (consulting) * Product - Varun.Dhawan@microsoft.com