我们可以为自动缩放组中的每个实例创建单独的 cloudwatch 警报吗

Can we create individual cloudwatch alarms for each instance in an Autoscaling group

因此我们的任务是为 Windows 个实例的磁盘存储创建警报。我们创建了警报,但它给出了自动缩放组中所有实例的平均值。是否可以为每个实例创建指标和警报,当 ASG 缩减时,它会删除这些警报。

我不确定这样做是否可行!

是的,可以为每个单独的实例创建警报。您需要在 ASG Launch 模板中通过 User data 使用 lambda 或简单的 运行 脚本。 This guide can help you create alarms when ASG scaleout and a new node is created. Be sure your source image has the proper tools installed to create the alarms.On scalein, you need to run another script which can delete the alarms for you. Check this 供参考。您还需要检查生命周期挂钩才能正常工作。
另一种方法是使用“cloudwatch rules -> event pattern -> autoscaling*”,它可以通过 sns(或直接发送到 lmbda)向您发送有关节点的所有 reqired 数据,您可以触发 lambda 并执行任何操作喜欢。