In order to monitor your compute resources to ensure they are performing properly, you must record performance related metrics. In this simple lab, you were able to create an EC2 instance and generate a simulated high-load situation to observe how CloudWatch can be used to monitor those resources. These are important concepts that you should use across all of your compute resources to ensure you are meeting PERF7 - “How do you monitor your resources to ensure they are performing?"
Now that you know how to have an EC2 instance report its metrics to CloudWatch, you should define the Key Performance Indicators (KPIs) to measure workload performance. In some cases, such as a image rendering farm, a high-cpu may be a valid metric and not be indicative of performance. Once defined, you should establish CloudWatch alarms to ensure you are meeting your performance metrics.
In addition to the lab tasks, feel free to use this lab deployment to test some additional CloudWatch features:
- Create a CPU or Memory alarm and test triggering the alarm by re-running step 5
- Zoom into various timeframes on the CloudWatch dashboard. Notice how it will link the two charts together when you zoom in.
- Use Metrics Explorer to look at other metrics deployed into the EC2 instance
- Explore the CloudFormation template to see how the various CloudWatch Agent configurations were deployed
Remove all the resources via CloudFormation
- Go to the AWS CloudFormation console: https://console.aws.amazon.com/cloudformation
- Select the CloudFormation stack to delete and click Delete
- In the confirmation dialog, click Delete stack
- The Status changes to DELETE_IN_PROGRESS
- Click the refresh button to update and status will ultimately progress to DELETE_COMPLETE
- When complete, the stack will no longer be displayed. To see deleted stacks use the drop down next to the Filter text box.
- To see progress during stack deletion
- Click the stack name
- Select the Events column
- Refresh to see new events
Delete the CloudWatch Dashboard
- Go to CloudWatch Dashboards
- Click the radio button next to the dashboard you created and then click Delete
References & useful resources