Skip to content

Commit

Permalink
fix(tf): sql alerting policy (#1231)
Browse files Browse the repository at this point in the history
* fix(tf): wip alerting policy

Co-authored-by: Thomas Arrow <[email protected]>
  • Loading branch information
deer-wmde and tarrow authored Nov 9, 2023
1 parent db48f1d commit c0c3950
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tf/modules/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# tf-module-monitoring-21
- Attempt to fix the failed logical SQL backup alerting policy

# tf-module-monitoring-20
- Add alert policy for critical PV usage (Logical SQL Backup)
- Fix failed logcial SQL backup alert policy by setting duration to 24h instead of 24h 30m
Expand Down
9 changes: 9 additions & 0 deletions tf/modules/monitoring/sql-backup-failure-alert.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ resource "google_monitoring_alert_policy" "alert_policy_sql_logical_backup_failu
condition_absent {
filter = "metric.type=\"logging.googleapis.com/user/${google_logging_metric.sql_logical_backup_success.name}\" AND resource.type=\"k8s_container\""
duration = "86400s"

aggregations {
cross_series_reducer = "REDUCE_COUNT"
per_series_aligner = "ALIGN_COUNT"
alignment_period = "60s"
group_by_fields = [
"resource.labels.container_name",
]
}
trigger {
count = 1
}
Expand Down

0 comments on commit c0c3950

Please sign in to comment.