首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >智能检测-故障异常-使用ARM模板为现有应用程序洞察手动创建警报

智能检测-故障异常-使用ARM模板为现有应用程序洞察手动创建警报
EN

Stack Overflow用户
提问于 2019-07-09 01:09:29
回答 1查看 849关注 0票数 0

我有很少的应用程序洞察和警报(智能检测-故障异常),这已经在过去创建。众所周知,《Classic Alert》将于2019年3月31日正式退役。

在我的场景中,我希望通过ARM模板手动创建新警报。以前它是“类型”的“失败异常- appinsightname01”:"Microsoft.Insights/alertRules“。这里,appinsightname01是一个应用洞察力名称,此警报在应用洞察力上自动创建。

现在,在8月31日之后,这将不再支持,所以我想使用ARM模板手动创建新的。

当我们创建"MetricAlert,AuditLogs,LogSearch“时,使用代码支持它吗?

请给我你的意见。谢谢

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-07-09 17:41:56

感谢您伸出援手!

您可以使用以下针对故障异常v2 (非经典)警报规则的ARM模板:

代码语言:javascript
复制
{
    "$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://docs.microsoft.com/en-us/azure/azure-monitor/app/proactive-arm-config#failure-anomalies-v2-non-classic-alert-rule

希望这能有所帮助!

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56939663

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档