Created
August 1, 2023 11:35
-
-
Save andrewmatveychuk/6528ac35aa295ff215a132a09a81b5f8 to your computer and use it in GitHub Desktop.
Get alerts in a time range in a resource group
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alertsmanagementresources | |
| where properties.essentials.targetResourceGroup =~ '{ResourceGroup:resourcegroup}' | |
| where properties.essentials.startDateTime {TimeRange} | |
| where properties.essentials.monitorCondition in ({AlertCondition}) | |
| extend severity = tostring(properties.essentials.severity), | |
alertCondition = tostring(properties.essentials.monitorCondition), | |
userResponse = tostring(properties.essentials.alertState), | |
targetResource = tostring(properties.essentials.targetResource), | |
fireTime = todatetime(properties.essentials.startDateTime) | |
| order by fireTime desc | |
| project name, severity, alertCondition, userResponse, targetResource, fireTime, properties |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment