【问题标题】:Azure - Arm Template - Scheduled Query ErrorAzure - Arm 模板 - 计划查询错误
【发布时间】:2018-11-06 23:49:44
【问题描述】:

我在使用 arm 模板创建计划查询时遇到一个奇怪的错误。

properties.search.query 不是有效的日志指标查询。它应该包含用于日志指标查询的“AggregatedValue”和“bin(timestamp, )”

在文档或示例中找不到搜索属性

模板

{
    location: "****",
    "properties": {
        "description": "****",
        "enabled": "true",
        "source": {
            "query": "exceptions",
            "authorizedResources": [],
            "dataSourceId": "/subscriptions/****",
            "queryType": "ResultCount"
        },
        "schedule": {
            "frequencyInMinutes": 5,
            "timeWindowInMinutes": 5
        },
        "action": {
            "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction",
            "severity": "1",
            "aznsAction": {
                "actionGroup": [ "/subscriptions/****" ]
            },
            "trigger": {
                "thresholdOperator": "GreaterThan",
                "threshold": 3,
                "metricTrigger": {
                    "thresholdOperator": "GreaterThan",
                    "threshold": 5,
                    "metricTriggerType": "Consecutive",
                    "metricColumn": "ColumnName"
                }
            }
        }
    },
}

当我使用来自的样本时也会发生 https://docs.microsoft.com/en-us/rest/api/monitor/scheduledqueryrules/createorupdate

有什么想法吗?

【问题讨论】:

    标签: azure arm-template


    【解决方案1】:

    我认为是因为你使用了这个部分:

    "metricTrigger":
    {
    "thresholdOperator": "GreaterThan",
    "threshold": 5,
    "metricTriggerType": "Consecutive",
    "metricColumn": "ColumnName"
    }
    

    您应该删除场景中的整个“metricTrigger”。

    【讨论】:

      猜你喜欢
      • 2020-12-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-03-20
      • 2019-02-11
      相关资源
      最近更新 更多