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
Personally I would use
UnhealthyHostCount >=0to let you know that at least one of your instances is unhealthy and I'd useHealthyHostCount < minimum ASG countto 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.