Skip to content

Commit

Permalink
Alarm grouping
Browse files Browse the repository at this point in the history
  • Loading branch information
markpullan committed Jan 9, 2025
1 parent b2619cf commit c4e8b9c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ resource "aws_cloudwatch_metric_alarm" "overdue_request_item_plans" {

metric_query {
id = "max_overdue_request_item_plans_count"
expression = "SELECT MAX(OverdueRequestItemPlansCount) FROM \"Notify/Watchdog\" WHERE environment='${var.environment}'"
expression = "SELECT MAX(OverdueRequestItemPlansCount) FROM \"Notify/Watchdog\" WHERE environment='${var.environment}' GROUP BY clientid, campaignid"
return_data = "true"
period = 3600
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ resource "aws_cloudwatch_metric_alarm" "overdue_request_items" {

metric_query {
id = "max_overdue_request_items_count"
expression = "SELECT MAX(OverdueRequestItemsCount) FROM \"Notify/Watchdog\" WHERE environment='${var.environment}'"
expression = "SELECT MAX(OverdueRequestItemsCount) FROM \"Notify/Watchdog\" WHERE environment='${var.environment}' GROUP BY clientid, campaignid"
return_data = "true"
period = 3600
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ resource "aws_cloudwatch_metric_alarm" "overdue_requests" {

metric_query {
id = "max_overdue_requests_count"
expression = "SELECT MAX(OverdueRequestsCount) FROM \"Notify/Watchdog\" WHERE environment='${var.environment}'"
expression = "SELECT MAX(OverdueRequestsCount) FROM \"Notify/Watchdog\" WHERE environment='${var.environment}' GROUP BY clientid, campaignid"
return_data = "true"
period = 3600
}
Expand Down

0 comments on commit c4e8b9c

Please sign in to comment.