From 60d942eeafe94d917a8656cdda1c1921f76d4819 Mon Sep 17 00:00:00 2001 From: Cody Soyland Date: Fri, 15 Sep 2023 10:20:11 -0400 Subject: [PATCH] Remove unneeded warning --- .../gcp/modules/monitoring/infra/alerts.tf | 48 ------------------- 1 file changed, 48 deletions(-) diff --git a/terraform/gcp/modules/monitoring/infra/alerts.tf b/terraform/gcp/modules/monitoring/infra/alerts.tf index fa82a5052..bcdd68a84 100644 --- a/terraform/gcp/modules/monitoring/infra/alerts.tf +++ b/terraform/gcp/modules/monitoring/infra/alerts.tf @@ -229,54 +229,6 @@ resource "google_monitoring_alert_policy" "cloud_sql_memory_utilization" { project = var.project_id } -# Cloud SQL Database Disk has < 30GiB Free -resource "google_monitoring_alert_policy" "cloud_sql_disk_utilization" { - # In the absence of data, incident will auto-close in 7 days - alert_strategy { - auto_close = "604800s" - } - - combiner = "OR" - - # Disk has less that 30GiB free - conditions { - # < 30GiB disk space free - condition_monitoring_query_language { - duration = "0s" - query = <<-EOT - fetch cloudsql_database - | { bytes: metric 'cloudsql.googleapis.com/database/disk/bytes_used' - ; quota: metric 'cloudsql.googleapis.com/database/disk/quota' - ; utilization: metric 'cloudsql.googleapis.com/database/disk/utilization' } - | join - | group_by 5m, [q_mean: mean(value.quota), b_mean: mean(value.bytes_used), u_mean: mean(value.utilization)] - | every 5m - | group_by [resource.database_id], [free_space: sub(mean(q_mean), mean(b_mean)), u: mean(u_mean)] - | condition and(free_space < 30 'GiBy', u > 0.98) - EOT - trigger { - count = "1" - percent = "0" - } - } - - display_name = "Cloud SQL Database - Disk free space and utilization [MEAN]" - } - - display_name = "Cloud SQL Database Disk has < 30GiB Free and Utilization > 98%" - - documentation { - content = "Cloud SQL disk has less than 30GiB free space remaining. Please increase capacity. Note that autoresize should be enabled for the database. Ensure there is no issue with the autoresize process." - mime_type = "text/markdown" - } - - enabled = "true" - notification_channels = local.notification_channels - project = var.project_id - - severity = "warning" -} - # 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