如何禁用Azure问题解决后的自动确认告警(Bicep配置)
解决已解决问题的确认告警问题
你只需要修改Bicep代码里的autoMitigate参数,将其值从true改为false,就能避免收到问题解决后的确认告警。
原因说明
当autoMitigate设置为true时,Azure会在告警触发后持续监控条件是否恢复正常,一旦恢复就发送“问题已解决”的通知;将其设为false后,系统只会在告警条件首次满足时发送通知,不会再跟进后续的恢复状态通知。
修改后的代码片段
"parameters": { "logAlerts": { "value": [ { "alertName": "Some Alert", "description": "Some alert Description", "enabled": true, "severity": 2, "scopes": [ "/Subscription" ], "autoMitigate": false, // 此处修改为false "targetResourceType": [ "microsoft.insights/components" ], "evaluationFrequency": "PT15M", "windowSize": "PT30M", "criteria": { "allOf": [ { "query": "", "timeAggregation": "Count", "dimensions": [], "operator": "GreaterThanOrEqual", "threshold": 100, "failingPeriods": { "numberOfEvaluationPeriods": 1, "minFailingPeriodsToAlert": 1 } } ] }, "actions": { "actionGroups": [ "" ], "customProperties": {} } } ] } }
内容的提问来源于stack exchange,提问作者Devendra Gohare
相关产品推荐
相关产品推荐

