Forum Discussion
Juval
Jun 30, 2020Brass Contributor
Is there a smart way to find out which Action Groups are in which Alerts?
After a while you lose sight if an Action Group is connected to an Alert. Currently i'm not aware of a way to check which Action Groups are linked to which Alerts.
Juval if you use resource graph for metric alerts "microsoft.insights/metricalerts"
there is a actiongroupID in the properties section.
2 Replies
- Billy YorkIron Contributor
Juval if you use resource graph for metric alerts "microsoft.insights/metricalerts"
there is a actiongroupID in the properties section.
- JuvalBrass Contributor
Billy York
Hi,Thanks for the tip! Thought of sharing if someone else needs the same info. This is what i scrambled up.
Resources| projectalertName = name,location,type,props = properties| where type contains "microsoft.insights/activitylogalerts"| mvexpand actionGroups = parse_json(props["actions"]["actionGroups"])| extend actionGroup = extract(@"([^\/]+$)",1,tostring(actionGroups.actionGroupId))| union(resources| projectalertName = name,location,type,props = properties| where type contains "microsoft.insights/metricalerts"| mvexpand actionGroups = parse_json(props["actions"])| extend actionGroup = extract(@"([^\/]+$)",1,tostring(actionGroups.actionGroupId)))