Skip to content
Snippets Groups Projects
Commit 186afd44 authored by nimrod's avatar nimrod
Browse files

Who watches the watchers?

Monitor the monitoring system.
parent 597d4b09
Branches
No related tags found
No related merge requests found
Pipeline #1303 passed
resource "aws_cloudwatch_metric_alarm" "invocations" {
count = length(local.function_names)
alarm_actions = [local.topic_arn]
actions_enabled = true
alarm_name = "Invocations alarm for ${local.function_names[count.index]}."
comparison_operator = "LessThanThreshold"
evaluation_periods = "1"
insufficient_data_actions = [local.topic_arn]
metric_name = "Invocations"
namespace = "AWS/Lambda"
ok_actions = [local.topic_arn]
period = (var.rate + 1) * 60
statistic = "Sum"
tags = local.common_tags
threshold = 1
dimensions = {
FunctionName = local.function_names[count.index]
}
}
resource "aws_cloudwatch_metric_alarm" "errors" {
count = length(local.function_names)
alarm_actions = [local.topic_arn]
actions_enabled = true
alarm_name = "Errors alarm for ${local.function_names[count.index]}."
comparison_operator = "GreaterThanThreshold"
evaluation_periods = "1"
insufficient_data_actions = [local.topic_arn]
metric_name = "Errors"
namespace = "AWS/Lambda"
ok_actions = [local.topic_arn]
period = (var.rate + 1) * 60
statistic = "Sum"
tags = local.common_tags
threshold = 0
dimensions = {
FunctionName = local.function_names[count.index]
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment