智能检测 - 故障异常 - 使用ARM模板手动创建现有应用程序见解的警报



我几乎没有应用程序洞察和警报(智能检测 - 失败异常(。众所周知,"经典警报"将于2019年3月31日退休。

在我的情况下,我想通过手臂模板手动创建新的警报。以前是" type":" microsoft.intights/alertrules"的"失败异常-AppinsightName01"。在这里,AppInsightName01是一个应用程序洞察名称,并且此警报自动在应用程序Insight上自动创建。

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

我们在创建" Metricalert,auditlogs,logSearch"?

时使用代码支持它。

请给我您的观点。谢谢

谢谢您的联系!

您可以使用以下臂模板进行故障异常V2(非经典(警报规则:

{
    "$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://learn.microsoft.com/en-us/azure/azure-monitor/App/proactive-arm-config#failure-anmalies-anmalies-v2-non-classic-alrert-rule

希望这会有所帮助!

最新更新