# Cloudwatch: One alarm for multiple instances

**URL:** <https://awshq.com/t/cloudwatch-one-alarm-for-multiple-instances/15026>\
**Category:** Monitoring & DevOps\
**Tags:** ec2, cloudwatch, sns\
**Created:** [June 1, 2022, 3:11pm UTC](https://awshq.com/t/cloudwatch-one-alarm-for-multiple-instances/15026 "2022-06-01T15:11:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dot\_537](https://awshq.com/letter_avatar_proxy/v4/letter/d/e5b9ba/32.png) [@Dot\_537](https://awshq.com/u/Dot_537)\
**Post date:** [June 1, 2022, 3:11pm UTC](https://awshq.com/t/cloudwatch-one-alarm-for-multiple-instances/15026/1 "2022-06-01T15:11:53Z")

</div>

I wanna create ONE alarm for 5 ec2 instances where when CPUUtilization is above 80% for either one or all of them, I will be notified via email. The SNS part is all set up, but I can’t find a way to set up one alarm for multiple instance’s CPUUtilization metric.

Is there a way to achieve that?

---

<div class="post-metadata">

**Author:** ![srandrews](https://awshq.com/letter_avatar_proxy/v4/letter/s/5daacb/32.png) [@srandrews](https://awshq.com/u/srandrews)\
**Post date:** [June 1, 2022, 7:02pm UTC](https://awshq.com/t/cloudwatch-one-alarm-for-multiple-instances/15026/2 "2022-06-01T19:02:01Z")

</div>

Composite alarm is what you are looking for

---

<div class="post-metadata">

**Author:** ![skitzot](https://awshq.com/letter_avatar_proxy/v4/letter/s/43a26b/32.png) [@skitzot](https://awshq.com/u/skitzot)\
**Post date:** [June 2, 2022, 2:44am UTC](https://awshq.com/t/cloudwatch-one-alarm-for-multiple-instances/15026/3 "2022-06-02T02:44:26Z")

</div>

> [@srandrews](#):
>
> Composite alarm is what you are looking for

Agreed: [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Create\_Composite\_Alarm.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Create%5C_Composite%5C_Alarm.html)

---

<div class="post-metadata">

**Author:** ![Dot\_537](https://awshq.com/letter_avatar_proxy/v4/letter/d/e5b9ba/32.png) [@Dot\_537](https://awshq.com/u/Dot_537)\
**Post date:** [June 3, 2022, 9:27pm UTC](https://awshq.com/t/cloudwatch-one-alarm-for-multiple-instances/15026/4 "2022-06-03T21:27:00Z")

</div>

> [@srandrews](#):
>
> Composite alarm is what you are looking for

I believe to create a composite alarm, you still have to create all the alarms and then select them to be one composite alarm

---

<div class="post-metadata">

**Author:** ![srandrews](https://awshq.com/letter_avatar_proxy/v4/letter/s/5daacb/32.png) [@srandrews](https://awshq.com/u/srandrews)\
**Post date:** [June 4, 2022, 4:20am UTC](https://awshq.com/t/cloudwatch-one-alarm-for-multiple-instances/15026/5 "2022-06-04T04:20:52Z")

</div>

> [@Dot\_537](#):
>
> I believe to create a composite alarm, you still have to create all the alarms and then select them to be one composite alarm

Yep!

---

<div class="post-metadata">

**Author:** ![Nikhil\_M](https://awshq.com/letter_avatar_proxy/v4/letter/n/e19b73/32.png) [@Nikhil\_M](https://awshq.com/u/Nikhil_M)\
**Post date:** [June 4, 2022, 6:41am UTC](https://awshq.com/t/cloudwatch-one-alarm-for-multiple-instances/15026/6 "2022-06-04T06:41:39Z")

</div>

You can’t do this as far as i know. Prometheus has this. Night want to look into that if you are open to use something other than cloudwatch.

You can define a single rule and it will alert for any instance

---

<div class="post-metadata">

**Author:** ![NiceComedian](https://awshq.com/letter_avatar_proxy/v4/letter/n/4da419/32.png) [@NiceComedian](https://awshq.com/u/NiceComedian)\
**Post date:** [June 22, 2022, 5:36pm UTC](https://awshq.com/t/cloudwatch-one-alarm-for-multiple-instances/15026/7 "2022-06-22T17:36:46Z")

</div>

Put them into a fixed AutoScaling Group, and alarm when Max statistic on the AutoScaling Group CPU metric goes \> 80%

Alternatively a single CloudWatch metric alarm can aggregate up to 10 metrics at a time (metric math alarm), so SORT the 5 instances by average CPU and alarm \> 80%
