Merge: alert policy reducer fix

This commit is contained in:
ZdenekSrotyr 2026-04-21 20:36:21 +02:00
commit dbac3e698c

View file

@ -291,14 +291,14 @@ resource "google_monitoring_alert_policy" "health_failure" {
condition_threshold { condition_threshold {
filter = "metric.type=\"monitoring.googleapis.com/uptime_check/check_passed\" AND metric.labels.check_id=\"${google_monitoring_uptime_check_config.health[each.key].uptime_check_id}\" AND resource.type=\"uptime_url\"" filter = "metric.type=\"monitoring.googleapis.com/uptime_check/check_passed\" AND metric.labels.check_id=\"${google_monitoring_uptime_check_config.health[each.key].uptime_check_id}\" AND resource.type=\"uptime_url\""
duration = "300s" duration = "300s"
# ALIGN_FRACTION_TRUE yields fraction of checks that returned true.
# If the fraction stays < 1 (i.e. any probe failed) for 5 min alert.
comparison = "COMPARISON_LT" comparison = "COMPARISON_LT"
threshold_value = 1 threshold_value = 1
aggregations { aggregations {
alignment_period = "60s" alignment_period = "60s"
per_series_aligner = "ALIGN_FRACTION_TRUE" per_series_aligner = "ALIGN_FRACTION_TRUE"
cross_series_reducer = "REDUCE_COUNT_FALSE"
group_by_fields = ["resource.label.host"]
} }
trigger { trigger {