Azure Monitor Rule Disabled
Query
AzureActivity
| where parse_json(Properties).message == "microsoft.insights/scheduledqueryrules/write"
| where parse_json(tostring(parse_json(tostring(Properties_d.requestbody)).properties)).enabled == falseExplanation
This KQL (Kusto Query Language) query is designed to filter and retrieve specific records from the AzureActivity table. Here's a simple breakdown of what it does:
-
Source Table: It starts by looking at the
AzureActivitytable, which contains logs of activities in Azure. -
First Filter: It filters the records to find those where the
Propertiesfield, when parsed as JSON, contains amessagethat equals"microsoft.insights/scheduledqueryrules/write". This indicates that the activity is related to writing (or creating/updating) scheduled query rules in Azure Monitor. -
Second Filter: It further filters these records to find those where the
enabledproperty within therequestbodyofPropertiesis set tofalse. This means it is specifically looking for activities where a scheduled query rule was written with theenabledstatus set tofalse, effectively indicating that the rule is being disabled or created in a disabled state.
In summary, this query is identifying activities where scheduled query rules in Azure Monitor are being written with the enabled property set to false.
Details

Jay Kerai
Released: January 1, 2025
Tables
Keywords
Operators