Browse the Repo

file-type-icon.circleci
file-type-icon_docs
file-type-iconexamples
file-type-iconmodules
file-type-iconagents
file-type-iconalarms
file-type-iconalb-alarms
file-type-iconalb-target-group-alarms
file-type-iconasg-cpu-alarms
file-type-iconasg-disk-alarms
file-type-iconasg-memory-alarms
file-type-iconec2-cpu-alarms
file-type-iconec2-disk-alarms
file-type-iconec2-memory-alarms
file-type-iconecs-cluster-alarms
file-type-iconecs-service-alarms
file-type-iconecs-service-with-alb-alarms
file-type-iconelasticache-memcached-alarms
file-type-iconelasticache-redis-alarms
file-type-iconelasticsearch-alarms
file-type-iconelb-alarms
file-type-iconREADME.md
file-type-iconmain.tf
file-type-iconvars.tf
file-type-iconlambda-alarms
file-type-iconrds-alarms
file-type-iconroute53-health-check-alarms
file-type-iconscheduled-job-alarm
file-type-iconsns-to-slack
file-type-iconsqs-alarms
file-type-iconREADME.md
file-type-iconlogs
file-type-iconmetrics
file-type-icontest
file-type-icon.gitignore
file-type-icon.pre-commit-config.yaml
file-type-iconCODEOWNERS
file-type-iconLICENSE.txt
file-type-iconREADME.md
file-type-iconterraform-cloud-enterprise-private-module-...

Browse the Repo

file-type-icon.circleci
file-type-icon_docs
file-type-iconexamples
file-type-iconmodules
file-type-iconagents
file-type-iconalarms
file-type-iconalb-alarms
file-type-iconalb-target-group-alarms
file-type-iconasg-cpu-alarms
file-type-iconasg-disk-alarms
file-type-iconasg-memory-alarms
file-type-iconec2-cpu-alarms
file-type-iconec2-disk-alarms
file-type-iconec2-memory-alarms
file-type-iconecs-cluster-alarms
file-type-iconecs-service-alarms
file-type-iconecs-service-with-alb-alarms
file-type-iconelasticache-memcached-alarms
file-type-iconelasticache-redis-alarms
file-type-iconelasticsearch-alarms
file-type-iconelb-alarms
file-type-iconREADME.md
file-type-iconmain.tf
file-type-iconvars.tf
file-type-iconlambda-alarms
file-type-iconrds-alarms
file-type-iconroute53-health-check-alarms
file-type-iconscheduled-job-alarm
file-type-iconsns-to-slack
file-type-iconsqs-alarms
file-type-iconREADME.md
file-type-iconlogs
file-type-iconmetrics
file-type-icontest
file-type-icon.gitignore
file-type-icon.pre-commit-config.yaml
file-type-iconCODEOWNERS
file-type-iconLICENSE.txt
file-type-iconREADME.md
file-type-iconterraform-cloud-enterprise-private-module-...
CloudWatch

CloudWatch

Send all metrics to CloudWatch, including those not visible to the EC2 hypervisor. Create dashboards and alerts as code.

Code Preview

Preview the Code

mobile file icon

README.md

down

ELB Alarms Module

This module adds alarms for metrics produced by an ELB. They will go off if the latency gets too high, or there are too many 5xx errors, or too few requests are coming in, all good indicators that something is going wrong with your servers.

Note: The elb-backend-connection-errors, elb-too-many-backend-5xx, and elb-too-many-5xx alarms all monitor metrics that are only reported when there are errors. If there are no errors, those metrics are not reported at all, and the alarm goes into an INSUFFICIENT_DATA state. This actually means everything is working OK. It's only when these alarms enter ALARM state that you need to look into it.

How do you use this module?

Check out the examples/elb-alarms example.

How do I get notifications from these alarms?

One of the parameters you pass to this module is a list of SNS topic ARNs to notify when the website goes down. Here is how to configure an SNS topic:

  1. Create an SNS topic using the Terraform aws_sns_topic resource.
  2. Pass the topic's ARN to this module (e.g. alarm_sns_topic_arns = "${aws_sns_topic.my_topic.arn}")
  3. Login to the SNS console.
  4. Click the "Topics" link in the menu on the left.
  5. Find your topic in the list and click the checkbox next to it.
  6. Click the "Actions" button and select "Subscribe to Topic".
  7. Choose "Email" or "SMS Message" as the protocol, enter your email or phone number, and click "Create Subscription".
  8. AWS will email or message you to confirm the subscription. Be sure to confirm it, or you won't receive any notifications, and the alarm will report its status as INSUFFICIENT_DATA!

Questions? Ask away.

We're here to talk about our services, answer any questions, give advice, or just to chat.

Ready to hand off the Gruntwork?