Skip to content

Commit

Permalink
copy 4xx alert settings beside freq and window size
Browse files Browse the repository at this point in the history
  • Loading branch information
pluckyswan committed Oct 23, 2024
1 parent fe75bf8 commit 5836486
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions operations/template/alert.tf
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,10 @@ resource "azurerm_monitor_metric_alert" "azure_5XX_alert" {
count = local.non_pr_environment ? 1 : 0
name = "cdcti-${var.environment}-azure-http-5XX-alert"
resource_group_name = data.azurerm_resource_group.group.name
scopes = [data.azurerm_resource_group.group.id]
scopes = [azurerm_linux_web_app.api.id]
description = "Action will be triggered when Http Status Code 5XX is greater than or equal to 1"
frequency = "PT1M" // Checks every 1 minute
window_size = "PT5M" // Every Check, looks back 5 minutes in history
//TBD: How frequent do we want this alert and how far do we want it to look back.
frequency = "PT1M" // Checks every 1 min
window_size = "PT5M" // Every Check looks back 5 min for 4xx errors

criteria {
metric_namespace = "Microsoft.Web/sites"
Expand All @@ -185,9 +184,20 @@ resource "azurerm_monitor_metric_alert" "azure_5XX_alert" {
}

lifecycle {
# Ignore changes to tags because the CDC sets these automagically
ignore_changes = [
# Ignore changes to tags because the CDC sets these automagically
tags,
tags["business_steward"],
tags["center"],
tags["environment"],
tags["escid"],
tags["funding_source"],
tags["pii_data"],
tags["security_compliance"],
tags["security_steward"],
tags["support_group"],
tags["system"],
tags["technical_steward"],
tags["zone"]
]
}
}
}

0 comments on commit 5836486

Please sign in to comment.