From d57c62d148ed72439ecf50c2b4056df337cd182b Mon Sep 17 00:00:00 2001 From: Hayden B Date: Mon, 18 Sep 2023 09:41:52 -0700 Subject: [PATCH] Remove Cloud SQL memory usage alerts (#767) Cloud SQL manages its own memory usage and appears to consume all available memory. Signed-off-by: Hayden B --- .../gcp/modules/monitoring/infra/alerts.tf | 89 ------------------- 1 file changed, 89 deletions(-) diff --git a/terraform/gcp/modules/monitoring/infra/alerts.tf b/terraform/gcp/modules/monitoring/infra/alerts.tf index bcdd68a84..0451708da 100644 --- a/terraform/gcp/modules/monitoring/infra/alerts.tf +++ b/terraform/gcp/modules/monitoring/infra/alerts.tf @@ -140,95 +140,6 @@ resource "google_monitoring_alert_policy" "cloud_sql_cpu_utilization" { project = var.project_id } - -# Cloud SQL Database Memory Utilization > 80% -resource "google_monitoring_alert_policy" "cloud_sql_memory_utilization_warning" { - # In the absence of data, incident will auto-close in 7 days - alert_strategy { - auto_close = "604800s" - } - - combiner = "OR" - - conditions { - condition_threshold { - aggregations { - alignment_period = "300s" - per_series_aligner = "ALIGN_MEAN" - } - - comparison = "COMPARISON_GT" - duration = "0s" - filter = "metric.type=\"cloudsql.googleapis.com/database/memory/utilization\" resource.type=\"cloudsql_database\"" - threshold_value = "0.8" - - trigger { - count = "1" - percent = "0" - } - } - - display_name = "Cloud SQL Database - Memory utilization [MEAN]" - } - - display_name = "Cloud SQL Database Memory Utilization > 80%" - - documentation { - content = "Cloud SQL Database Memory Utilization is >80%. Please increase memory capacity." - mime_type = "text/markdown" - } - - enabled = "true" - notification_channels = local.notification_channels - project = var.project_id - - user_labels = { - severity = "warning" - } -} - -# Cloud SQL Database Memory Utilization > 90% -resource "google_monitoring_alert_policy" "cloud_sql_memory_utilization" { - # In the absence of data, incident will auto-close in 7 days - alert_strategy { - auto_close = "604800s" - } - - combiner = "OR" - - conditions { - condition_threshold { - aggregations { - alignment_period = "300s" - per_series_aligner = "ALIGN_MEAN" - } - - comparison = "COMPARISON_GT" - duration = "0s" - filter = "metric.type=\"cloudsql.googleapis.com/database/memory/utilization\" resource.type=\"cloudsql_database\"" - threshold_value = "0.9" - - trigger { - count = "1" - percent = "0" - } - } - - display_name = "Cloud SQL Database - Memory utilization [MEAN]" - } - - display_name = "Cloud SQL Database Memory Utilization > 90%" - - documentation { - content = "Cloud SQL Database Memory Utilization is >90%. Please increase memory capacity." - mime_type = "text/markdown" - } - - enabled = "true" - notification_channels = local.notification_channels - project = var.project_id -} - # Cloud SQL Database Disk has < 20GiB Free resource "google_monitoring_alert_policy" "cloud_sql_disk_utilization" { # In the absence of data, incident will auto-close in 7 days