An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
Hello Eric Maes,
Your expectation is generally correct: when a metric alert is configured with Auto-mitigate enabled, Azure Monitor will automatically resolve the alert after the alert condition is no longer met during subsequent evaluations.
From the screenshots, the alert fired when is_db_alive dropped from 1 to 0, which matches the configured condition (Less than 1). The metric chart also shows that the value later returned to 1, indicating that the database became available again.
However, alert resolution is based on the alert rule's evaluation logic rather than only the latest metric value. Azure Monitor evaluates the metric using the configured:
- Aggregation type (Average, Minimum, Maximum, etc.)
- Aggregation granularity (Period)
- Evaluation frequency
- Auto-mitigation setting
For example, if the rule uses Average or Minimum aggregation, the evaluation window may still include earlier datapoints with a value of 0 even after the metric has recovered to 1. In that situation, the alert can remain in the Fired state until the evaluation window no longer contains the unhealthy values.
I recommend reviewing the following settings in the alert rule:
- Alert Rule → Condition
- Aggregation type
- Threshold
- Evaluation frequency
- Aggregation granularity (Period)
- Evaluation frequency
- Threshold
- Aggregation type
Alert Rule → Alert Details
- Verify that Automatically resolve alerts remains enabled.
Alert History
- Check the evaluation history after the metric returned to **1** to confirm how Azure Monitor is evaluating the recovery condition.
Also, the Acknowledged status shown in the alert does not affect auto-resolution. It only reflects the user response state and does not prevent the alert from transitioning to Resolved.
Based on the information currently available, the most likely explanation is that the alert evaluation settings are still considering earlier unhealthy datapoints within the evaluation window, causing the alert condition to remain active even though the latest metric values are healthy.
For reference:
- https://learn.microsoft.com/azure/azure-monitor/alerts/alerts-metric-overview
- Troubleshoot Azure Monitor metric alerts
If you can share the alert rule configuration (Aggregation Type, Period, Evaluation Frequency, and Auto-mitigate setting), we can help determine whether the current behavior is expected based on the rule configuration.