SOLVED

Is there a smart way to find out which Action Groups are in which Alerts?

Copper Contributor

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.

2 Replies
best response confirmed by Juval (Copper Contributor)
Solution

@Juval if you use resource graph for metric alerts "microsoft.insights/metricalerts"

there is a actiongroupID in the properties section.

@Billy York 
Hi,

 

Thanks for the tip! Thought of sharing if someone else needs the same info. This is what i scrambled up.

 

Resources
project
    alertName = 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
        | project
            alertName = name,
            location,
            type,
            props = properties
        | where type contains "microsoft.insights/metricalerts" 
        | mvexpand actionGroups = parse_json(props["actions"])
        | extend actionGroup = extract(@"([^\/]+$)",1,tostring(actionGroups.actionGroupId))
    )
1 best response

Accepted Solutions
best response confirmed by Juval (Copper Contributor)
Solution

@Juval if you use resource graph for metric alerts "microsoft.insights/metricalerts"

there is a actiongroupID in the properties section.

View solution in original post