Skip to content

Commit

Permalink
Fix alarms, reset on missing data
Browse files Browse the repository at this point in the history
  • Loading branch information
JoryUK committed Jul 8, 2020
1 parent 0f0751f commit 08ed4f9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/cloudwatch_lambda/cloudwatch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ resource "aws_cloudwatch_metric_alarm" "lambda_memory_alert" {
actions_enabled = "${var.alarm_action_enabled}"
tags = "${local.tags}"
count = "${var.enable_cloudwatch_alarms}"
treat_missing_data = "missing"
}

resource "aws_cloudwatch_metric_alarm" "lambda_duration_alert" {
Expand All @@ -45,7 +46,7 @@ resource "aws_cloudwatch_metric_alarm" "lambda_duration_alert" {
statistic = "Maximum"
threshold = "${var.alarm_timeout * 1000 * 0.80}"
alarm_description = "${var.app_name} execution duration is approaching timeout"
treat_missing_data = "ignore"
treat_missing_data = "missing"
insufficient_data_actions = []
alarm_actions = ["${var.alarm_action_arn}"]
ok_actions = []
Expand All @@ -68,7 +69,7 @@ resource "aws_cloudwatch_metric_alarm" "lambda_errors" {
statistic = "Maximum"
threshold = "1"
alarm_description = "${var.app_name} error"
treat_missing_data = "ignore"
treat_missing_data = "notBreaching"
insufficient_data_actions = []
alarm_actions = ["${var.alarm_action_arn}"]
ok_actions = []
Expand Down

0 comments on commit 08ed4f9

Please sign in to comment.