Using CloudWatch for Resource Monitoring

Hands-On Lab

 

Photo of Mark Richman

Mark Richman

AWS Training Architect II in Content

Length

00:30:00

Difficulty

Intermediate

Welcome to this AWS hands-on lab for Using CloudWatch for Resource Monitoring! This lab provides practical experience with creating and configuring multiple custom AWS CloudWatch dashboards and widgets. The primary focus will be on the following features within CloudWatch: 1. CloudWatch Dashboards 1. Dashboard Widgets 1. CloudWatch Metrics CloudWatch Dashboards built with custom widgets allow you to visually monitor resources and proactively take actions if needed. Overall, the dashboards give you a central (and visual) view of how your monitored resources are behaving at specific points in time.

What are Hands-On Labs?

Hands-On Labs are scenario-based learning environments where learners can practice without consequences. Don't compromise a system or waste money on expensive downloads. Practice real-world skills without the real-world risk, no assembly required.

Using CloudWatch for Resource Monitoring

Introduction

Welcome to this AWS hands-on lab for Using CloudWatch for Resource Monitoring!

This lab provides practical experience with creating and configuring multiple custom AWS CloudWatch dashboards and widgets.

The primary focus will be on the following features within CloudWatch:

  1. CloudWatch Dashboards
  2. Dashboard Widgets
  3. CloudWatch Metrics

Solution

  1. Log in to the AWS Management Console using the credentials provided on the lab instructions page. Make sure you're using the us-east-1 region.

Create a CloudWatch Dashboard for the DMZ Layer

  1. In the AWS Management Console, start typing "CloudWatch" into the search box and click on CloudWatch when it appears in the list.

  2. Click on Dashboards from the left-hand menu.

  3. Click Create dashboard.

  4. Under Dashboard name:, enter "DMZLayer".

  5. Click Create dashboard.

  6. Select the Line option and click Configure.

  7. Click EC2.

  8. Click Per-Instance Metrics.

  9. In the filter box, enter "CPUUtilization".

  10. Select the box next to bastion-host.

  11. Click on custom at the top of the window and select 15 Minutes.

  12. Click Create widget.

  13. Expand the graph for readability and then click Save dashboard.

Create a CloudWatch Dashboard for the Application Layer

  1. Click on Metrics from the left-hand menu.

  2. Click EC2.

  3. Click Per-Instance Metrics.

  4. Find CPUUtilization under Metric Name and click the down arrow next to the name. Select Search for this only from the menu.

  5. Select the database instance and both instance-wordpress instances by clicking the boxes next to their names.

  6. Click the dropdown at the top with the word Line displayed. Select Stacked area from the list of options.

  7. Click on custom at the top of the window and select 15 Minutes.

  8. Click Actions at the top of the window and select Add to dashboard.

  9. Click Create new under Select a dashboard. Enter "AppLayer" in the box that appears and then click the checkmark next to the box.

  10. Click Add to dashboard.

  11. Expand the graph for readability and then click Save dashboard.

Add Custom Widgets for the Application Layer

  1. Click Add widget.

  2. Select Number.

  3. Click Configure.

  4. Click ApplicationELB.

  5. Click Per AppELB Metrics.

  6. Find RequestCount under Metric Name and select it.

  7. Click Create widget.

  8. Click Save dashboard.

  9. Click Add widget.

  10. Select Line.

  11. Click Configure.

  12. Click EC2.

  13. Click Per-Instance Metrics.

  14. Find NetworkIn under Metric Name and click the down arrow next to the name.

  15. Select Search for this only.

  16. Select the database instance and both instance-wordpress instances by clicking the boxes next to their names.

  17. Click Create widget.

  18. Click Save dashboard.

Test the Widgets

  1. Click Services in the top menu bar.

  2. Click EC2 under Compute.

  3. Click Load Balancers under LOAD BALANCING.

  4. Copy the DNS name of the only available load balancer.

  5. Open a new tab and navigate to the copied DNS name.

  6. Click Continue.

  7. For Site Title, enter "Lab".

  8. For Username, enter "wpuser".

  9. For Password, enter "Password1".

  10. Click the box for Confirm use of weak password.

  11. Enter our email address in the box provided.

  12. Click Install WordPresS.

  13. Click Log In.

  14. Enter the credentials just created and log in to the site.

  15. Switch back to the AWS Management Console.

  16. Click CloudWatch from the left-hand menu.

  17. Click Dashboards from the left-hand menu.

  18. Click AppLayer.

  19. Click custom at the top.

  20. Select 5 Minutes.

  21. Click the down arrow in the top left next to the refresh button.

  22. Select Auto refresh and an interval of 10 Seconds.

Conclusion

Congratulations — you've completed this hands-on lab!