Skip to content

Commit

Permalink
chore: Change threshold SNATConnectionCount alert (#2148)
Browse files Browse the repository at this point in the history
change threshold SNATConnectionCount
  • Loading branch information
pasqualespica authored Jun 14, 2024
1 parent e4b9ff6 commit 4e464d0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/natgateway.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,24 @@ module "nat_gw" {
resource "azurerm_monitor_metric_alert" "snat_connection_over_10K" {
count = (var.env_short == "p" && var.nat_gateway_enabled) ? 1 : 0

name = "${local.project}-natgw-connetion-over-10k"
name = "${local.project}-natgw-connetion-over-30k"
resource_group_name = azurerm_resource_group.monitor_rg.name
scopes = [module.nat_gw[0].id]
description = "Total SNAT connections over 10K"
description = "Total SNAT connections over 30K"
severity = 3
frequency = "PT5M"
window_size = "PT5M"

target_resource_type = "Microsoft.Network/natGateways"
target_resource_location = var.location


# https://learn.microsoft.com/it-it/azure/load-balancer/load-balancer-outbound-connections#what-are-snat-ports
criteria {
metric_namespace = "Microsoft.Network/natGateways"
metric_name = "SNATConnectionCount"
aggregation = "Total"
operator = "GreaterThan"
threshold = "10000"
threshold = "30000" # Each NAT gateway public IP address provides 64,512 SNAT ports to make outbound connections
skip_metric_validation = false
}

Expand Down

0 comments on commit 4e464d0

Please sign in to comment.