gpt4 book ai didi

azure-log-analytics - 为从门户创建的 Azure 日志分析警报导出 ARM 模板

转载 作者:行者123 更新时间:2023-12-03 20:26:04 25 4
gpt4 key购买 nike

我已经创建了 Azure Log Analytics(监控)警报来监控逻辑应用程序故障,并且我已经使用 Azure 门户完成了这项工作。
我想知道如何将 Azure 门户创建的警报导出为 ARM 模板?
任何人都知道我们如何实现它。

谢谢
enter image description here

enter image description here

最佳答案

如果您想在门户中导出警报的 ARM 模板,请按照以下步骤操作。

1.在门户中,导航到警报所在的资源组(:这是警报的组,不是警报的目标资源组),选择Show hidden types选项 -> 找到您的警报并选择它 -> 单击 Export Template .

enter image description here

2.点击Download如下所示,然后它将模板下载为压缩文件,其中包含 template.jsonparameters.json到本地。

enter image description here

更新:

您使用的是 legacy Log Analytics Alert ,自2019年6月1日起,自动使用新scheduledQueryRules默认情况下,在 Azure 门户中,其资源类型为
microsoft.insights/scheduledqueryrules
.

在你的情况下,你可以关注这个 link从旧警报切换到新警报。

或在门户中创建新警报,导航至 Log Analytics workspace在门户中 -> New alert rule -> 添加 Custom log search并创建它。

enter image description here

创建后,在资源组中,选择 Show hidden types选项,您将找到如下所示的警报,然后您可以导出模板。

enter image description here

关于azure-log-analytics - 为从门户创建的 Azure 日志分析警报导出 ARM 模板,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61002521/

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