Skip to content

Commit aa9c14f

Browse files
[PRM-134-v2] add ok action to high alarm, experiment with tags
1 parent 67a1404 commit aa9c14f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

infrastructure/lambda-search-patient.tf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ resource "aws_cloudwatch_metric_alarm" "error_alarm_count_medium" {
4040
evaluation_periods = 1
4141
alarm_actions = [module.search_patient_alarm_topic.arn]
4242
ok_actions = [module.search_patient_alarm_topic.arn]
43+
tags = {
44+
alerting_type = "KPI"
45+
alarm_group = module.search-patient-details-lambda.function_name
46+
}
4347
metric_query {
4448
id = "error"
4549
label = "error count for search patient, high if about 4, low if between 1 and 3"
@@ -68,6 +72,7 @@ resource "aws_cloudwatch_metric_alarm" "error_alarm_count_high" {
6872
comparison_operator = "GreaterThanThreshold"
6973
evaluation_periods = 1
7074
alarm_actions = [module.search_patient_alarm_topic.arn]
75+
ok_actions = [module.search_patient_alarm_topic.arn]
7176
threshold = 3
7277
period = 120
7378
dimensions = {
@@ -76,6 +81,10 @@ resource "aws_cloudwatch_metric_alarm" "error_alarm_count_high" {
7681
metric_name = "Errors"
7782
statistic = "Sum"
7883
namespace = "AWS/Lambda"
84+
tags = {
85+
alerting_type = "KPI"
86+
alarm_group = module.search-patient-details-lambda.function_name
87+
}
7988
}
8089

8190

0 commit comments

Comments
 (0)