Skip to content

Commit

Permalink
Add alert for prober verification data absent
Browse files Browse the repository at this point in the history
Signed-off-by: Hayden B <[email protected]>
  • Loading branch information
haydentherapper authored Oct 31, 2023
1 parent 2f5659f commit 3871134
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions terraform/gcp/modules/monitoring/prober/prober_alerts.tf
Original file line number Diff line number Diff line change
Expand Up @@ -226,3 +226,42 @@ resource "google_monitoring_alert_policy" "prober_verification" {
notification_channels = local.notification_channels
project = var.project_id
}

resource "google_monitoring_alert_policy" "prober_verification_data_absent_alert" {
alert_strategy {
auto_close = "604800s"
}

combiner = "OR"

conditions {
condition_absent {
aggregations {
alignment_period = "300s"
cross_series_reducer = "REDUCE_PERCENTILE_95"
per_series_aligner = "ALIGN_MEAN"
}

duration = "300s"
filter = "resource.type = \"prometheus_target\" AND metric.type = \"prometheus.googleapis.com/verification/unknown\""

trigger {
count = "1"
percent = "0"
}
}

display_name = format("API Prober: Verification Data Absent for 5 minutes: %s", each.key)
}

display_name = format("API Prober: Verification Data Absent for 5 minutes: %s", each.key)

documentation {
content = format("Verification Data Absent for 5 minutes: %s. Check playbook for more details.", each.key)
mime_type = "text/markdown"
}

enabled = "true"
notification_channels = local.notification_channels
project = var.project_id
}

0 comments on commit 3871134

Please sign in to comment.