I have a basic azure alert where it looks at the windows logs of a VM, and determines whether it should fire an alert upon detecting a specific event ID
Event | where EventID == "500" | summarize arg_max(TimeGenerated, *) by ParameterXml | project TimeGenerated, Computer, EventID, RenderedDescription | order by TimeGenerated
The conditions are whether the event is detected once or more in the space of 5 minutes. I’m looking to have some alert logic in there where it only fires, if additional alert event "650" has not fired.
I have tried using joins to attach the additional event ID onto the query, but unsure how to parse the logic to say not fired
https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-log-query (Example 4)
Summary
Fire alert if event id 500 detected and event id 650 not detected
2
Answers
A possible solution:
The summarize line filters the newest event with ID 500 and counts the events with ID 650.
A possible solution with join leftanti: