X-Git-Url: http://git.squeep.com/?p=awsible;a=blobdiff_plain;f=infrastructure%2Fmodules%2Fmanagement-stack%2Falarms.tf;h=3e244fb8fd8d0dbb1054708cebcfbf07b0622936;hp=c278d190cf6ebd7df8e8039c8bc2d441670885f8;hb=73fe1815838073d5120358020a1ad151918e45f4;hpb=0d01159a10c892df107142341eff662d4ca57dc5 diff --git a/infrastructure/modules/management-stack/alarms.tf b/infrastructure/modules/management-stack/alarms.tf index c278d19..3e244fb 100644 --- a/infrastructure/modules/management-stack/alarms.tf +++ b/infrastructure/modules/management-stack/alarms.tf @@ -29,3 +29,16 @@ resource "aws_cloudwatch_metric_alarm" "failures-present" { } alarm_actions = ["${aws_sns_topic.management-alerts.arn}"] } + +resource "aws_cloudwatch_metric_alarm" "unhealthy" { + alarm_name = "UnhealthyHostCount" + alarm_description = "Alert when any ELB has unhealthy hosts." + metric_name = "UnHealthyHostCount" + comparison_operator = "GreaterThanOrEqualToThreshold" + evaluation_periods = 15 + period = 60 + namespace = "AWS/ELB" + statistic = "Maximum" + threshold = 1 + alarm_actions = ["${aws_sns_topic.management-alerts.arn}"] +} \ No newline at end of file