Hi ,
Thanks for reaching out to Microsoft Q&A.
You are asking a very relevant question when it comes to understanding Azure Monitor alert lifecycle tracking using Azure Resource Graph, specifically the AlertsManagementResources
table.
Here is a clear breakdown to address your concern:
- Alert Lifecycle and
monitorCondition
Behavior
- In Azure Monitor, each alert instance is identified by a unique
alertId
.
The monitorCondition
typically reflects the current state of the alert: either "Fired"
or "Resolved"
.
- ARG does not log historical state transitions. It always returns the latest snapshot of each alert. So: If the alert was fired and then resolved within the query time range, you will only see it with
monitorCondition = "Resolved"
.- The same
alertId
will not appear twice in the results with both fired and resolved, it shows only the latest state.
- The same
Hence, you are not seeing overwritten logs, but ARG is giving you the latest state only.
- Why Only Resolved Alerts Are Visible
- This likely means:
- All alerts fired and then resolved within the 24hr window you are querying.
- ARG only shows the current state per alert, so if it was resolved, you see that state, not the previous
"Fired"
state.
"monitorCondition": "Fired"
.
- What About Alert History and Full Lifecycle?
- If you want full lifecycle tracking (both fired and resolved events with timestamps), you should not rely solely on ARG.
- Instead, use:
- Azure Monitor Activity Logs (
AzureDiagnostics
table) - Log Analytics with alert rule diagnostics enabled (this logs all state transitions)
- Or push alert lifecycle to Log Analytics using Action Groups (via Logic Apps or Azure Functions)
- Azure Monitor Activity Logs (
Please feel free to click the 'Upvote' (Thumbs-up) button and 'Accept as Answer'. This helps the community by allowing others with similar queries to easily find the solution.