Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Commit

Permalink
Fix stackdriver export alert again. (#1317)
Browse files Browse the repository at this point in the history
It should alert on any export failure if it lasts more than 5min
(duration setting for this alert.)
  • Loading branch information
yegle authored Dec 10, 2020
1 parent d29d02d commit fc112f0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions terraform/alerting/alerts.tf
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,8 @@ resource "google_monitoring_alert_policy" "StackdriverExportFailed" {
cloud_run_revision::logging.googleapis.com/user/stackdriver_export_error_count
| align rate(1m)
| group_by [resource.service_name], [val: sum(value.stackdriver_export_error_count)]
# Alert when there's more than 1 failures every two minutes
# 1/(2*60) = 0.017
# The Stackdriver exports every 2 minutes.
| condition val > 0.017 '1/s'
# Any export error for more than 5min should alert.
| condition val > 0
EOT
trigger {
count = 1
Expand Down

0 comments on commit fc112f0

Please sign in to comment.