From b2916fb79bc70a92c44f0b5fac2bc77c4e38c291 Mon Sep 17 00:00:00 2001 From: Hector Fernandez Date: Wed, 6 Dec 2023 16:20:29 -0700 Subject: [PATCH] change api prober alert (#892) Signed-off-by: Hector Fernandez --- .../gcp/modules/monitoring/prober/prober_alerts.tf | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/terraform/gcp/modules/monitoring/prober/prober_alerts.tf b/terraform/gcp/modules/monitoring/prober/prober_alerts.tf index da52197f6..d350e8dc6 100644 --- a/terraform/gcp/modules/monitoring/prober/prober_alerts.tf +++ b/terraform/gcp/modules/monitoring/prober/prober_alerts.tf @@ -199,17 +199,21 @@ resource "google_monitoring_alert_policy" "prober_verification" { condition_threshold { aggregations { alignment_period = "60s" - per_series_aligner = "ALIGN_SUM" + per_series_aligner = "ALIGN_RATE" } comparison = "COMPARISON_GT" - duration = "0s" - filter = "resource.type = \"prometheus_target\" AND metric.type = \"prometheus.googleapis.com/verification/unknown\" AND metric.labels.verified = \"false\"" + duration = "60s" + filter = "resource.type = \"prometheus_target\" AND metric.type = \"prometheus.googleapis.com/verification/unknown:counter\" AND metric.labels.verified = \"false\"" threshold_value = "0" + // When there are no responses we get no data instead of "0" in the + // metric. This flag treats lack of data as 0 so incidents autoresolve + // correctly. + evaluation_missing_data = "EVALUATION_MISSING_DATA_NO_OP" + trigger { - count = "1" - percent = "0" + count = "1" } }