From a45087293c1a7bd6018b94c829316e2aa67a525f Mon Sep 17 00:00:00 2001 From: Pat Heard Date: Wed, 24 Jan 2024 20:48:30 +0000 Subject: [PATCH] fix: CloudWatch alarms Make the alarms trigger for all `ERROR`, `Exception` and `WARNING` strings. --- terraform/alarms.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/terraform/alarms.tf b/terraform/alarms.tf index b631192e..e1b747da 100644 --- a/terraform/alarms.tf +++ b/terraform/alarms.tf @@ -1,6 +1,6 @@ resource "aws_cloudwatch_log_metric_filter" "sre_bot_error" { name = local.error_logged - pattern = "\"ERROR:slack_bolt.App\"" + pattern = "?ERROR ?Exception" log_group_name = local.api_cloudwatch_log_group metric_transformation { @@ -29,7 +29,7 @@ resource "aws_cloudwatch_metric_alarm" "sre_bot_error" { resource "aws_cloudwatch_log_metric_filter" "sre_bot_warning" { name = local.warning_logged - pattern = "\"WARNING:slack_bolt.App\"" + pattern = "WARNING" log_group_name = local.api_cloudwatch_log_group metric_transformation {