AWS CloudWatch alarm for ELB HealthyHostCount or UnhealthyHostCount

2k Views Asked by At

I have set up two EC2 instances in an Auto Scaling Group behind an application load balancer. I want to set up an alarm in Cloud Watch to get notification when both EC2 insatnces are unhealthy .

What metric should I use in CloudWatch?

Either HealthyHostCount >= 0 or UnhealthyHostCount <=1 or UnhealthyHostCount >=0

1

There are 1 best solutions below

1
Chris Williams On

Personally I would use UnhealthyHostCount >=0 to let you know that at least one of your instances is unhealthy and I'd use HealthyHostCount < minimum ASG count to make sure that your instances are not missing from the ELB. Make sure to consider any timings of events whereby you might deregister/register instances.