Created
January 20, 2022 15:29
-
-
Save quatrix/9d9984d3066fff3b713c2e464f05a6df to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_cloudwatch_metric_alarm" "alarm" { | |
alarm_name = "dead_man_switch" | |
comparison_operator = "LessThanOrEqualToThreshold" | |
evaluation_periods = "1" | |
statistic = "Average" | |
metric_name = "Invocations" | |
namespace = "AWS/Lambda" | |
period = "60" | |
threshold = "0" | |
treat_missing_data = "breaching" | |
dimensions = { | |
FunctionName = aws_lambda_function.dead_man_switch.function_name | |
} | |
alarm_description = "Grafan is down" | |
alarm_actions = [aws_sns_topic.pagerduty_service.arn] | |
ok_actions = [aws_sns_topic.pagerduty_service.arn] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment