【问题标题】:Smart Detection - Failure Anomalies - Alert create manually using ARM templates for existing App Insights智能检测 - 故障异常 - 使用 ARM 模板为现有 App Insights 手动创建警报
【发布时间】:2019-07-08 17:09:29
【问题描述】:

我几乎没有过去创建的应用程序洞察力和警报(智能检测 - 故障异常)。众所周知,“经典警报”将于 2019 年 3 月 31 日停用。

在我的场景中,我想通过 ARM 模板手动创建新警报。以前它是“类型”的“故障异常 - appinsightname01”:“Microsoft.Insights/alertRules”。此处,appinsightname01 是应用洞察名称,此警报会在应用洞察时自动创建。

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

在我们创建“MetricAlert、AuditLogs、LogSearch”时支持使用代码?

请给我你的意见。 谢谢

【问题讨论】:

    标签: azure azure-monitoring


    【解决方案1】:

    感谢您与我们联系!

    您可以将以下 ARM 模板用于故障异常 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://docs.microsoft.com/en-us/azure/azure-monitor/app/proactive-arm-config#failure-anomalies-v2-non-classic-alert-rule

    希望这会有所帮助!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-11-02
      • 2017-10-17
      • 2021-09-14
      • 2021-04-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多