gpt4 book ai didi

Azure 搜索操作组

转载 作者:行者123 更新时间:2023-12-02 06:24:58 25 4
gpt4 key购买 nike

假设在多个警报中使用一个操作组。此操作组与逻辑应用链接。

如何获取有关此操作组消耗了哪些警报/Azure 资源的报告?

最佳答案

您可以使用 microsoft.insights/metricalertsmicrosoft.insights/activitylogalerts 找出哪些操作组包含在哪些警报中。

谢谢Billy YorkJuval 。将您的建议作为答案发布以帮助社区成员。

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))
)
az monitor activity-log alert action-group add -n {AlertName} -g {ResourceGroup} \
--action /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/microsoft.insights/actionGroups/{ActionGroup} \
--webhook-properties usage=test owner=jane

您可以引用Is there a smart way to find out which Action Groups are in which Alerts? , az monitor activity-log alert action-groupHow to create an alert rule using PowerShell and Azure CLI

关于Azure 搜索操作组,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68755716/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com