Azure Database for PostgreSQL: is_db_alive Showing as 0 Despite Server Being Healthy — Metric Issue

Jarvis 20 Reputation points
2026-09-30T15:08:11.3633333+00:00

Problem description

I am observing that the 'is_db_alive' metric for my Azure Database for PostgreSQL flexible server is consistently showing a value of 0, even though the server is actively serving connections and traffic without any issues. The server's PostgreSQL version is 15.19, and I have not restarted the server recently. I am seeking to understand why this metric remains at 0 despite the server's healthy state.

Environment

Azure Database for PostgreSQL flexible server, PostgreSQL 15.19, region not specified.

What I've already tried

I have not tried anything yet.

Current status

I am looking for guidance on whether this is a known metric emission issue or if there are further steps I should take to diagnose or resolve the discrepancy.

Azure Database for PostgreSQL

1 answer

Sort by: Most helpful
  1. Vinodh247-1375 44,801 Reputation points Volunteer Moderator
    2026-09-30T15:45:45.0333333+00:00

    tldr If client connections, query execution, Resource Health, and other monitoring signals all indicate normal operation, investigate the accuracy of the is_db_alive metric itself before concluding that the PostgreSQL server is unavailable.


    The Database Is Alive (is_db_alive) metric is intended to indicate database availability, where 1 = available and 0 = unavailable. Azure Database for PostgreSQL Flexible Server emits this metric to Azure Monitor on a regular interval and Microsoft recommends using the MAX aggregation when evaluating availability. (Microsoft Learn)

    If your PostgreSQL server is actively accepting connections, serving queries, and other platform metrics continue to update normally, then an is_db_alive value of 0 by itself is not sufficient evidence that the database is unavailable.

    A few checks that may help narrow down the cause:

    1. Verify the metric is being viewed with MAX aggregation rather than Average or other aggregations. Microsoft's availability metric guidance specifically references MAX aggregation for determining availability during a given period.
    2. Correlate the timestamp with other metrics such as Succeeded Connections, Active Connections, CPU utilisation, and storage activity. If those metrics show normal activity while is_db_alive remains 0, that suggests a discrepancy between the availability metric and the observed workload behaviour.
    3. Review Resource Health and the Activity Log for any platform events, maintenance activities, or availability incidents that coincide with the affected timeframe.
    4. Query the metric directly through Azure Monitor Metrics or Log Analytics (if exported) to confirm the value is not a portal visualisation issue.
    5. Check whether the behaviour is continuous or intermittent. A continuously reported value of 0 while the database remains fully operational is not the expected behaviour for this metric.

    Based on the symptoms described, where the server remains healthy and continues serving traffic, the issue appears more likely to be related to metric collection or reporting rather than an actual PostgreSQL availability problem. The key indicator would be whether connectivity, queries, and other health metrics continue to function normally during the same period.

    Help make this community better for everyone: if this answer resolved your issue, please accept it or leave an upvote. If not, share more details in a comment so we can continue the discussion and find the right solution.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.