【发布时间】:2021-11-30 13:11:35
【问题描述】:
我想添加另一个条件,但出现此错误 当警报规则包含多个条件时,维度的使用仅限于每个条件内每个维度一个值
resource "azurerm_monitor_metric_alert" "example" {
name = "example-metricalert"
resource_group_name = azurerm_resource_group.main.name
scopes = [azurerm_storage_account.to_monitor.id]
description = "Action will be triggered when Transactions count is greater than 50."
criteria {
metric_namespace = "Microsoft.Storage/storageAccounts"
metric_name = "Transactions"
aggregation = "Total"
operator = "GreaterThan"
threshold = 50
dimension {
name = "ApiName"
operator = "Include"
values = ["*"]
}
}
criteria {
metric_namespace = "Microsoft.Storage/storageAccounts"
metric_name = "Transactions"
aggregation = "Total"
operator = "GreaterThan"
threshold = 50
dimension {
name = "ApiName"
operator = "Include"
values = ["*"]
}
}
action {
action_group_id = azurerm_monitor_action_group.main.id
}
【问题讨论】:
-
您好@Mr_Unchanied,AFAIK 如果有多个维度,即维度值不能为 ["*"],则无法创建另一个条件/标准。如果您可以在那里提供特定的 API 名称,那么您可以创建另一个标准。门户网站也一样
标签: azure cloud devops terraform-provider-azure infrastructure