Skip to content

Instantly share code, notes, and snippets.

@kian
Created January 29, 2019 20:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kian/35a63922d260dae68a3a4dbb62519237 to your computer and use it in GitHub Desktop.
Save kian/35a63922d260dae68a3a4dbb62519237 to your computer and use it in GitHub Desktop.
resource "aws_cloudwatch_metric_alarm" "www-production-high-alb-5xx" {
alarm_name = "www-production-high-alb-5xx"
comparison_operator = "GreaterThanThreshold"
evaluation_periods = "1"
metric_name = "HTTPCode_ELB_5XX_Count"
namespace = "AWS/ApplicationELB"
period = "60"
statistic = "Sum"
threshold = "30"
alarm_actions = ["arn:aws:sns:us-east-1:1234567:slack-alerts"]
ok_actions = ["arn:aws:sns:us-east-1:1234567:slack-alerts"]
insufficient_data_actions = []
treat_missing_data = "notBreaching"
dimensions {
LoadBalancer = "app/www/81818b4d5eb1b076"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment