How to create Alarm on CPUUtilization Metric for multiple instances at a time?

I have 20 EC2 Linux instances and trying to create alarms if threshold is met. If I have to create alarms for CPU metric of every instance from the Cloud Watch console, I have to create 20 alarms. Instead of doing that,I want to create alarm on CPUUtilization Metric for multiple instances at a time ?:

1 answer

  • answered 2018-05-16 06:00 craigcaulfield

    There are a couple of alternatives:

    • Build the alarms into the CloudFormation template for your instances and then every instance can easily have its own alarm.
    • If you have detailed metrics turned on for your instances (at an additional cost), you can get CloudWatch to aggregate statistics such as average CPU utilisation. See Aggregate Statistics Across Instances for the procedure.