Skip to content

Commit 749ac3b

Browse files
committed
setup metrics and alarm for fhir api and change error notifications env
1 parent 93b19a6 commit 749ac3b

File tree

14 files changed

+49
-19
lines changed

14 files changed

+49
-19
lines changed

infrastructure/instance/batch_processor_filter_lambda.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ resource "aws_lambda_event_source_mapping" "batch_file_created_sqs_to_lambda" {
305305
}
306306

307307
resource "aws_cloudwatch_log_metric_filter" "batch_processor_filter_error_logs" {
308-
count = var.batch_error_notifications_enabled ? 1 : 0
308+
count = var.error_alarm_notifications_enabled ? 1 : 0
309309

310310
name = "${local.short_prefix}-BatchProcessorFilterErrorLogsFilter"
311311
# Ignore errors with the below exception type. This is an expected error which returns items to the queue
@@ -320,7 +320,7 @@ resource "aws_cloudwatch_log_metric_filter" "batch_processor_filter_error_logs"
320320
}
321321

322322
resource "aws_cloudwatch_metric_alarm" "batch_processor_filter_error_alarm" {
323-
count = var.batch_error_notifications_enabled ? 1 : 0
323+
count = var.error_alarm_notifications_enabled ? 1 : 0
324324

325325
alarm_name = "${local.short_prefix}-batch-processor-filter-lambda-error"
326326
comparison_operator = "GreaterThanOrEqualToThreshold"

infrastructure/instance/ecs_batch_processor_config.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ resource "aws_cloudwatch_log_group" "pipe_log_group" {
372372
}
373373

374374
resource "aws_cloudwatch_log_metric_filter" "record_processor_task_error_logs" {
375-
count = var.batch_error_notifications_enabled ? 1 : 0
375+
count = var.error_alarm_notifications_enabled ? 1 : 0
376376

377377
name = "${local.short_prefix}-RecordProcessorTaskErrorLogsFilter"
378378
pattern = "%ERROR:%"
@@ -386,7 +386,7 @@ resource "aws_cloudwatch_log_metric_filter" "record_processor_task_error_logs" {
386386
}
387387

388388
resource "aws_cloudwatch_metric_alarm" "record_processor_task_error_alarm" {
389-
count = var.batch_error_notifications_enabled ? 1 : 0
389+
count = var.error_alarm_notifications_enabled ? 1 : 0
390390

391391
alarm_name = "${local.short_prefix}-record-processor-task-error"
392392
comparison_operator = "GreaterThanOrEqualToThreshold"

infrastructure/instance/environments/dev/int/variables.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ environment = "dev"
33
immunisation_account_id = "345594581768"
44
dspp_core_account_id = "603871901111"
55
pds_environment = "int"
6-
batch_error_notifications_enabled = true
6+
error_alarm_notifications_enabled = true
77
create_mesh_processor = true
88
has_sub_environment_scope = true

infrastructure/instance/environments/dev/internal-dev/variables.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ environment = "dev"
22
immunisation_account_id = "345594581768"
33
dspp_core_account_id = "603871901111"
44
pds_environment = "int"
5-
batch_error_notifications_enabled = true
5+
error_alarm_notifications_enabled = true
66
create_mesh_processor = false
77
has_sub_environment_scope = true

infrastructure/instance/environments/dev/internal-qa/variables.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ environment = "dev"
22
immunisation_account_id = "345594581768"
33
dspp_core_account_id = "603871901111"
44
pds_environment = "int"
5-
batch_error_notifications_enabled = false
5+
error_alarm_notifications_enabled = false
66
create_mesh_processor = false
77
has_sub_environment_scope = true

infrastructure/instance/environments/dev/pr/variables.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ environment = "dev"
22
immunisation_account_id = "345594581768"
33
dspp_core_account_id = "603871901111"
44
pds_environment = "int"
5-
batch_error_notifications_enabled = false
5+
error_alarm_notifications_enabled = false
66
create_mesh_processor = false
77
has_sub_environment_scope = true

infrastructure/instance/environments/dev/ref/variables.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ environment = "dev"
22
immunisation_account_id = "345594581768"
33
dspp_core_account_id = "603871901111"
44
pds_environment = "ref"
5-
batch_error_notifications_enabled = true
5+
error_alarm_notifications_enabled = true
66
create_mesh_processor = false
77
has_sub_environment_scope = true

infrastructure/instance/environments/preprod/int-blue/variables.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ environment = "preprod"
22
immunisation_account_id = "084828561157"
33
dspp_core_account_id = "603871901111"
44
pds_environment = "int"
5-
batch_error_notifications_enabled = true
5+
error_alarm_notifications_enabled = true
66
create_mesh_processor = true
77
has_sub_environment_scope = false

infrastructure/instance/environments/preprod/int-green/variables.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ environment = "preprod"
22
immunisation_account_id = "084828561157"
33
dspp_core_account_id = "603871901111"
44
pds_environment = "int"
5-
batch_error_notifications_enabled = true
5+
error_alarm_notifications_enabled = true
66
create_mesh_processor = true
77
has_sub_environment_scope = false

infrastructure/instance/environments/prod/blue/variables.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ environment = "prod"
22
immunisation_account_id = "664418956997"
33
dspp_core_account_id = "232116723729"
44
pds_environment = "prod"
5-
batch_error_notifications_enabled = true
5+
error_alarm_notifications_enabled = true
66
create_mesh_processor = true
77
has_sub_environment_scope = false

0 commit comments

Comments
 (0)