Creating a CloudWatch alarm

In this section, we shall discuss creating a CloudWatch alarm:

  • Specify an Alarm name, as shown in the following screenshot.
  • For a new alarm, ECS metrics are used for the CloudWatch alarm. To use other metrics for auto scaling, create an alarm in the CloudWatch console and select the alarm within Add policy with Use an existing Alarm. Only two ECS metrics are available for configuring a new alarm in Add policy: CPUUtilization and MemorUtilization. Select CPUUtilization.
  • The alarm threshold specifies when the auto scaling policy is to be applied. An example of auto scaling is to scale the tasks when MemoryUtilization exceeds 256 MB. Different measures are available for defining the alarm threshold. The different alarm threshold measures are Average, Minimum, Maximum, Sum, and Data samples. As an example, select Maximum
  • Because the ECS service metric is selected as CPUUtilization, the comparison operators (<,<=,>,>=) are defined on CPUUtilization. Select >= as an example.
  • Specify a value (0.1) for the comparison.
  • Specify the number of consecutive periods after which the Alarm threshold would have been exceeded and the auto scaling policy should be applied as 1. A period definition is not fixed and different options to define a period are 1 minute, 5 minutes, 15 minutes, and 1 hour. The lower the frequency value, the faster the response to resource utilization fluctuations would be. Select 1 minute as an example. Click on Save, as shown in the following screenshot:

 A CloudWatch alarm for the auto scaling policy has now been defined. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.14.151.45