0
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 については不明です。

4

2 に答える 2

0

カスタム メトリックを監視およびアラートするには、 monitor_scheduled_query_rules_alertを使用する必要があるようです。

于 2020-10-06T23:17:38.880 に答える