resource "azurerm_monitor_metric_alert" "exception_alert_test_incoming_orders" {
name = "IncomingOrderTest"
resource_group_name = "${var.azurerm_resource_group_name}"
scopes = ["${azurerm_application_insights.app_insights_test.id}"]
enabled = "${var.test_insight_alerts_enabled}"
description = "Alert due to 0 incoming orders on last 24 hours (Test)"
frequency = "PT1H"
window_size = "P1D"
criteria {
metric_namespace = "Azure.ApplicationInsights"
metric_name = "IncomingOrder"
aggregation = "Count"
operator = "Equals"
threshold = 0
}
action {
action_group_id = "${azurerm_monitor_action_group.monitor_alert_action_test.id}"
}
}
警报没有触发变量是正确的,并且不确定 metric_namespace。