使用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
有什么想法吗?
答案 0 :(得分:0)
我认为是因为您使用了此部分:
"metricTrigger":
{
"thresholdOperator": "GreaterThan",
"threshold": 5,
"metricTriggerType": "Consecutive",
"metricColumn": "ColumnName"
}
您应该在方案中删除整个“ metricTrigger”。