我有很少的应用程序洞察和警报(智能检测-故障异常),这已经在过去创建。众所周知,《Classic Alert》将于2019年3月31日正式退役。
在我的场景中,我希望通过ARM模板手动创建新警报。以前它是“类型”的“失败异常- appinsightname01”:"Microsoft.Insights/alertRules“。这里,appinsightname01是一个应用洞察力名称,此警报在应用洞察力上自动创建。
现在,在8月31日之后,这将不再支持,所以我想使用ARM模板手动创建新的。
当我们创建"MetricAlert,AuditLogs,LogSearch“时,使用代码支持它吗?
请给我你的意见。谢谢
发布于 2019-07-09 17:41:56
感谢您伸出援手!
您可以使用以下针对故障异常v2 (非经典)警报规则的ARM模板:
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"type": "microsoft.alertsmanagement/smartdetectoralertrules",
"apiVersion": "2019-03-01",
"name": "Failure Anomalies - my-app",
"properties": {
"description": "Detects a spike in the failure rate of requests or dependencies",
"state": "Enabled",
"severity": "2",
"frequency": "PT1M",
"detector": {
"id": "FailureAnomaliesDetector"
},
"scope": ["/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/MyResourceGroup/providers/microsoft.insights/components/my-app"],
"actionGroups": {
"groupIds": ["/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/MyResourceGroup/providers/microsoft.insights/actiongroups/MyActionGroup"]
}
}
}
]
}希望这能有所帮助!
https://stackoverflow.com/questions/56939663
复制相似问题