cloudwatch alarm setup by resource group

0

I like the idea of setting up resource groups, but can you setup cloudwatch alerts based on metrics by that group? Example, if I have 5 API servers, I have a resource tag, made a group and the 5 appear. But, I don't see a simple way if I add a new server to that group to have it automatically know "oh, I am supposed to have an alarm on my CPU" and other cloudwatch rules. Is there an easy/automated way to do that?

已提问 2 年前648 查看次数
1 回答
0

Hi lraymond!

I have found on a different forum an example of using AWS Lambda in order to automatically create alarms:

https://stackoverflow.com/questions/62655992/how-to-create-automatic-cloudwatch-alarm-on-new-ec2-instance-creation

Of course you need to create alarms when the instances are created, and delete them on termination so that you do not reach any limits and keep it clean.

Also you can create Composite Alarms to aggregate alarms from different sources:

https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Create_Composite_Alarm.html

If this does not meet your requirements, please provide more details or an example :)

已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则