|
1 | | -resource "azurerm_monitor_scheduled_query_rules_alert_v2" "five_hundred_error_alert" { |
2 | | - count = var.enable_alerting ? 1 : 0 |
| 1 | +# resource "azurerm_monitor_scheduled_query_rules_alert_v2" "five_hundred_error_alert" { |
| 2 | +# count = var.enable_alerting ? 1 : 0 |
3 | 3 |
|
4 | | - auto_mitigation_enabled = false |
5 | | - description = "An alert triggered by 500 errors logged in code" |
6 | | - enabled = var.enable_alerting |
7 | | - evaluation_frequency = "PT5M" |
8 | | - location = var.region |
9 | | - name = "${var.app_short_name}-500-error-alert" |
10 | | - resource_group_name = azurerm_resource_group.main.name |
11 | | - scopes = [var.action_group_id] |
12 | | - severity = 2 |
13 | | - skip_query_validation = false |
14 | | - window_duration = "PT5M" |
15 | | - workspace_alerts_storage_enabled = false |
| 4 | +# auto_mitigation_enabled = false |
| 5 | +# description = "An alert triggered by 500 errors logged in code" |
| 6 | +# enabled = var.enable_alerting |
| 7 | +# evaluation_frequency = "PT5M" |
| 8 | +# location = var.region |
| 9 | +# name = "${var.app_short_name}-500-error-alert" |
| 10 | +# resource_group_name = azurerm_resource_group.main.name |
| 11 | +# scopes = [var.action_group_id] |
| 12 | +# severity = 2 |
| 13 | +# skip_query_validation = false |
| 14 | +# window_duration = "PT5M" |
| 15 | +# workspace_alerts_storage_enabled = false |
16 | 16 |
|
17 | | - action { |
18 | | - action_groups = [var.action_group_id] |
19 | | - } |
| 17 | +# action { |
| 18 | +# action_groups = [var.action_group_id] |
| 19 | +# } |
20 | 20 |
|
21 | | - criteria { |
22 | | - operator = "GreaterThan" |
23 | | - query = <<-QUERY |
24 | | - ContainerAppConsoleLogs_CL |
25 | | - | where Log contains "[ERROR]" |
26 | | - QUERY |
27 | | - threshold = 0 |
28 | | - time_aggregation_method = "Count" |
| 21 | +# criteria { |
| 22 | +# operator = "GreaterThan" |
| 23 | +# query = <<-QUERY |
| 24 | +# ContainerAppConsoleLogs_CL |
| 25 | +# | where Log contains "[ERROR]" |
| 26 | +# QUERY |
| 27 | +# threshold = 0 |
| 28 | +# time_aggregation_method = "Count" |
29 | 29 |
|
30 | | - failing_periods { |
31 | | - minimum_failing_periods_to_trigger_alert = 1 |
32 | | - number_of_evaluation_periods = 1 |
33 | | - } |
34 | | - } |
35 | | -} |
| 30 | +# failing_periods { |
| 31 | +# minimum_failing_periods_to_trigger_alert = 1 |
| 32 | +# number_of_evaluation_periods = 1 |
| 33 | +# } |
| 34 | +# } |
| 35 | +# } |
0 commit comments