rust1001
rust1001

Reputation: 13

Aws Cloudwatch AutoScalingGroup Ec2 not working

I have been struggling several days with Auto scaling Ec2 instances. Please help....

Here are the steps:

  1. Create a Launch Template (nothing special here)
  2. Create an Auto Scaling Group by using the lauch template created in #1.
  3. Create an alarm in CloudWatch (When CPU Utilization > 30 in consecutive 60s, trigger action)
  4. Create a policy(add one unit) in autoScalingGroup created in #2. Attach the policy to the alarm.
  5. Lauch ec2 instance and use script to make cpu utilization > 60

Result:

  1. No new Ec2 instance is created when CPU utilization of existing Ec2 instance is higher than 30.
  2. Alarm status is always "Insufficient Data" when running the existing Ec2 instance more than 30 mins with CPU utilization higher than 30.
  3. Even changing the option of alerm to "Treat missing data as good (not breaching threshold)", still no new Ec2 instance is created.

Upvotes: 0

Views: 164

Answers (1)

rust1001
rust1001

Reputation: 13

Made some progress, Even created a new instance manually without AutoScaling, Alarm in cloudWatch not working. Not sure why. I strictly followed the instructions on an Yutube success example.


Update at 18th Feb. It's ... that Cloudwatch delayed 4 mins to send out alarm email.

  1. Run "stress xxx &" script at 10:30:32 (this is shown in console when running date command)
  2. Alarm triggered an email. Email was received with content "Friday 18 February, 2022 10:36:03 UTC"

Upvotes: 1

Related Questions