Skip to content

Commit

Permalink
remove webhook forward progress alert (#348)
Browse files Browse the repository at this point in the history
  • Loading branch information
shankiyani authored Oct 16, 2024
1 parent 0ff5c60 commit 66742aa
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 17 deletions.
2 changes: 1 addition & 1 deletion terraform/modules/artifacts/cloud_run_job.tf
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ resource "google_cloud_scheduler_job" "scheduler" {
module "artifact_alerts" {
count = var.alerts_enabled ? 1 : 0

source = "git::https://github.com/abcxyz/terraform-modules.git//modules/alerts_cloud_run?ref=e4682f7a1f9ad1524ca720301589212ac2635024"
source = "git::https://github.com/abcxyz/terraform-modules.git//modules/alerts_cloud_run?ref=597217bd226277c83de53fb426144f60d4708625"

project_id = var.project_id

Expand Down
2 changes: 1 addition & 1 deletion terraform/modules/commit_review_status/cloud_run_job.tf
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ resource "google_cloud_scheduler_job" "scheduler" {
module "commit_review_status_alerts" {
count = var.alerts_enabled ? 1 : 0

source = "git::https://github.com/abcxyz/terraform-modules.git//modules/alerts_cloud_run?ref=e4682f7a1f9ad1524ca720301589212ac2635024"
source = "git::https://github.com/abcxyz/terraform-modules.git//modules/alerts_cloud_run?ref=597217bd226277c83de53fb426144f60d4708625"

project_id = var.project_id

Expand Down
14 changes: 13 additions & 1 deletion terraform/service_retry.tf
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ resource "google_service_account_iam_member" "retry_run_sa_user" {
module "retry_alerts" {
count = var.retry_alerts.enabled ? 1 : 0

source = "git::https://github.com/abcxyz/terraform-modules.git//modules/alerts_cloud_run?ref=e4682f7a1f9ad1524ca720301589212ac2635024"
source = "git::https://github.com/abcxyz/terraform-modules.git//modules/alerts_cloud_run?ref=597217bd226277c83de53fb426144f60d4708625"

project_id = var.project_id

Expand Down Expand Up @@ -243,6 +243,18 @@ module "retry_alerts" {
var.retry_alerts.log_based_json_indicators
)

service_4xx_configuration = {
enabled = true
window = 300
threshold = 0
}

service_5xx_configuration = {
enabled = true
window = 300
threshold = 0
}

service_latency_configuration = {
enabled = true
window = local.retry_service_window
Expand Down
28 changes: 14 additions & 14 deletions terraform/service_webhook.tf
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ resource "google_service_account_iam_member" "webhook_run_sa_user" {
module "webhook_alerts" {
count = var.webhook_alerts.enabled ? 1 : 0

source = "git::https://github.com/abcxyz/terraform-modules.git//modules/alerts_cloud_run?ref=e4682f7a1f9ad1524ca720301589212ac2635024"
source = "git::https://github.com/abcxyz/terraform-modules.git//modules/alerts_cloud_run?ref=597217bd226277c83de53fb426144f60d4708625"

project_id = var.project_id

notification_channels_non_paging = [for x in values(google_monitoring_notification_channel.non_paging) : x.id]
enable_built_in_forward_progress_indicators = true
enable_built_in_forward_progress_indicators = false
enable_built_in_container_indicators = true
enable_log_based_text_indicators = true
enable_log_based_json_indicators = true
Expand All @@ -105,18 +105,6 @@ module "webhook_alerts" {
request_latency = local.request_latency_runbook
}

built_in_forward_progress_indicators = merge(
{
"request-count" = {
metric = "request_count"
window = local.webhook_service_window
threshold = 1
additional_filters = "metric.label.response_code_class=\"2xx\""
},
},
var.webhook_alerts.built_in_forward_progress_indicators,
)

built_in_container_util_indicators = merge(
{
"cpu" = {
Expand Down Expand Up @@ -170,6 +158,18 @@ module "webhook_alerts" {
var.webhook_alerts.log_based_json_indicators
)

service_4xx_configuration = {
enabled = true
window = 300
threshold = 0
}

service_5xx_configuration = {
enabled = true
window = 300
threshold = 0
}

service_latency_configuration = {
enabled = true
window = local.webhook_service_window
Expand Down

0 comments on commit 66742aa

Please sign in to comment.