Using CloudWatch for Resource Monitoring

30 minutes
  • 3 Learning Objectives

About this Hands-on Lab

Welcome to this AWS hands-on lab about 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 action if needed. Overall, the dashboards give you a central (and visual) view of how your monitored resources are behaving at specific points in time.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Create a CloudWatch Dashboard for the DMZ Layer

Create a CloudWatch dashboard specific to the DMZ layer. After, set up a widget within the DMZ layer dashboard for the bastion host instance set to monitor the CPUUtilization metric.

  1. In the AWS Management Console, navigate to CloudWatch.
  2. Select Dashboards.
  3. Choose Create dashboard (Name your dashboard DMZLayer).
  4. Select a Line widget, then select Metrics.
  5. Select Configure.
  6. Under All Metrics > EC2 > Per-instance Metrics, enter CPUUtilization into the search bar. Find the bastion-host server row and select it. Configure the timeline by selecting the custom down arrow and clicking 15 minutes.
  7. Choose Create widget, then Save dashboard.
Create a CloudWatch Dashboard for the Application Layer

Create a separate CloudWatch dashboard with widgets displaying metrics specific to the Application layer (don’t forget to SAVE the dashboard once you’re done!)

  1. In the AWS Management Console, navigate to CloudWatch.
  2. Select Metrics > EC2> Per-instance Metrics. Find CPUUtilization, click on it, then choose Search for this only in the dropdown.
  3. Find the instance-wordpress rows and the database row and select them. Configure the timeline by selecting the custom down arrow and clicking 15 minutes. Change dropdown list from line to Stacked area.
  4. Click Actions in the top-right corner and select Add to dashboard.
  5. Click Create new under Select a dashboard. Enter "AppLayer" in the box that appears and then click the checkmark.
  6. Select > Add widget > Number > ApplicationELB > Per AppELB Metrics.
  7. Find RequestCount under Metric Name and click the down arrow next to RequestCount. Select Search for this only from the menu.

    Note: If 2 load balancers are present, select the one with 0 for RequestCount.

  8. Select Create Widget > Save dashboard.
  9. Click Add widget.
  10. Select Line.
  11. Select Metrics.
  12. Click Configure.
  13. Click EC2.
  14. Click Per-Instance Metrics.
  15. Find NetworkIn under Metric Name and click the down arrow next to NetworkIn. Select Search for this only from the menu.
  16. Select the database instance and both instance-wordpress instances by clicking the boxes next to their names.
  17. Click Create widget.

Note: Ensure you save your dashboards before ending the lab

Test the Widgets
  1. Navigate back to the EC2 Management Console in a second browser tab.
  2. Select Load Balancing >> Load Balancers in the left-hand menu.
  3. Under Description > Basic Configuration, copy the DNS name.
  4. Open a new tab and paste the load balancer DNS name.
  5. For English, click Continue.
  6. For Site Title, enter "Lab".
  7. For Username, enter "wpuser".
  8. For Password, enter "Password1".
  9. Click the box for Confirm use of weak password.
  10. For Your Email, enter "test@acloud.guru".
  11. Click Install WordPress.
  12. Click Log In.
  13. Enter the credentials just created and log in to the site.
  14. Navigate back to the CloudWatch Management Console tab.
  15. Click on the refresh icon for the CPUUtilization box.
  16. Click on the three dots in the top-right corner of the CPUUtilization box and select Edit.
  17. Click custom at the top-right corner and then select 15 Minutes.
  18. To configure Auto refresh, click on the down arrow next to the refresh icon and select 10 Seconds as the Refresh interval.
  19. Click Update widget.
  20. Click on the refresh icon for the CPUUtilization dashboard (this may take a few minutes). These values will show that you are now monitoring resources using CloudWatch.

Additional Resources

Log in using the credentials provided to you. You should have been given a user name of 'cloud_user' and a randomly generated password.

When you log in, please make sure you are in the N. Virginia us-east-1 Region.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?