In this section, we shall explore the CloudWatch metrics and logs generated by the ECS service and find log events for the CloudWatch alarm threshold being exceeded:
- Open the CloudWatch console as shown here. The alarm summary for the AutoScaleCPUUtilization gets displayed in a graph.
- Click on Browse Metrics to browse metrics:
- Select Alarms in the margin. The AutoScaleBasedOnCPUUtilization alarm used as a threshold for auto scaling gets listed, as shown in the following screenshot. The alarm state is ALARM when the alarm threshold is exceeded.
The AutoScaleBasedOnCPUUtilization alarm details and graph get displayed. The two spikes in CPU utilization in the graph indicate that the alarm threshold has been exceeded, which applies the auto scaling to add one task each time the alarm threshold is exceeded. The first spike in the...