Loading...
No results found.

    Essential Google Cloud Infrastructure: Core Services

    Get access to 700+ labs and courses

    Resource Monitoring

    Lab 1 hour universal_currency_alt 5 Credits show_chart Introductory
    info This lab may incorporate AI tools to support your learning.
    Get access to 700+ labs and courses

    Overview

    In this lab, you learn how to use Cloud Monitoring to gain insight into applications that run on Google Cloud.

    Objectives

    In this lab, you learn how to perform the following tasks:

    • Explore Cloud Monitoring by creating a custom dashboard with charts
    • Create alerts with multiple conditions
    • Create resource groups
    • Create uptime checks

    Setup and Requirements

    For each lab, you get a new Google Cloud project and set of resources for a fixed time at no cost.

    1. Click the Start Lab button. If you need to pay for the lab, a pop-up opens for you to select your payment method. On the left is the Lab Details panel with the following:

      • The Open Google Cloud console button
      • Time remaining
      • The temporary credentials that you must use for this lab
      • Other information, if needed, to step through this lab
    2. Click Open Google Cloud console (or right-click and select Open Link in Incognito Window if you are running the Chrome browser).

      The lab spins up resources, and then opens another tab that shows the Sign in page.

      Tip: Arrange the tabs in separate windows, side-by-side.

      Note: If you see the Choose an account dialog, click Use Another Account.
    3. If necessary, copy the Username below and paste it into the Sign in dialog.

      {{{user_0.username | "Username"}}}

      You can also find the Username in the Lab Details panel.

    4. Click Next.

    5. Copy the Password below and paste it into the Welcome dialog.

      {{{user_0.password | "Password"}}}

      You can also find the Password in the Lab Details panel.

    6. Click Next.

      Important: You must use the credentials the lab provides you. Do not use your Google Cloud account credentials. Note: Using your own Google Cloud account for this lab may incur extra charges.
    7. Click through the subsequent pages:

      • Accept the terms and conditions.
      • Do not add recovery options or two-factor authentication (because this is a temporary account).
      • Do not sign up for free trials.

    After a few moments, the Google Cloud console opens in this tab.

    Note: To view a menu with a list of Google Cloud products and services, click the Navigation menu at the top-left, or type the service or product name in the Search field.

    Task 1. Create a Cloud Monitoring workspace

    In this task, you create a Cloud Monitoring workspace to monitor your Google Cloud resources.

    Verify resources to monitor

    Three VM instances have been created for you that you will monitor.

    • In the Google Cloud console, in the Navigation menu (), click Compute Engine > VM instances. Notice the nginxstack-1, nginxstack-2 and nginxstack-3 instances.

    Create a Monitoring workspace

    You will now setup a Monitoring workspace that's tied to your Google Cloud Project. The following steps create a new account that has a free trial of Monitoring.

    1. On the Google Cloud console title bar, type Monitoring in the Search field, then click Monitoring in the Products & Page section.

    2. Wait for your workspace to be provisioned.

    When the Monitoring dashboard opens, your workspace is ready.

    Task 2. Custom dashboards

    In this task, you create a custom dashboard in Cloud Monitoring and examine resource usage data.

    Create a dashboard

    1. In the left pane, click Dashboards.
    2. Click +Create Dashboard.
    3. For New Dashboard Name, type My Dashboard.

    Add a chart

    1. Click Add Widget,and then select Line.

    2. For Widget Title, give your chart a name (you can revise this before you save based on the selections you make).

    3. Type CPU utilization or CPU usage in Metric field dropdown, Click VM Instance > Instance. Select CPU utilization or CPU usage and click Apply.

      Note: Uncheck Active if you are unable to find the CPU utilization
    4. Click + Add Filter and explore the various options.

    5. Click Apply to create the chart.

    Metrics Explorer

    The Metrics Explorer allows you to examine resources and metrics without having to create a chart on a dashboard. Try to recreate the chart you just created using the Metrics Explorer.

    1. In the left pane, click Metrics explorer.
    2. Select a Metric from the dropdown.
    3. Explore the various options and try to recreate the chart you created earlier.
    Note: Not all metrics are currently available on the Metrics Explorer, so you might not be able to find the exact metric you used on the previous step.

    Click Check my progress to verify the objective. Create custom dashboard

    Task 3. Alerting policies

    In this task, you create an alert policy in Cloud Monitoring to notify you when CPU usage exceeds a specified threshold.

    Create an alert and add the first condition

    1. In the left pane, select Alerting.

    2. Click + Create Policy.

    3. Click on Select a metric dropdown. Uncheck the Active option.

    4. Type VM Instance in filter by resource and metric name and click on VM Instance > Instance. Select CPU usage or CPU Utilization and click Apply.

      Note: If you cannot locate the VM Instance resource type, you might have to refresh the page.
    5. Set Rolling windows to 1 min.

    6. Click Next. Set Threshold position to Above Threshold and set 20 as your Threshold value.

    7. Click Next.

    Add a second condition

    1. Click +ADD ALERT CONDITION.
    2. Repeat the steps above to specify the second condition for this policy. For example, repeat the condition for a different instance. Click Next.
    3. In Multi-condition trigger, select All conditions are met.
    4. Click Next.

    Configure notifications and finish the alerting policy

    1. Click on the dropdown arrow next to Notification Channels, then click on Manage Notification Channels.

      The Notification channels page will open in a new tab.

    2. Scroll down the page and click on ADD NEW for Email.

    3. Enter your personal email in the Email Address field and a Display name.

    4. Click Save.

    5. Go back to the previous Configure notifications and finalize alert tab.

    6. Click on Notification Channels again, then click on the Refresh icon to get the display name you mentioned in the previous step. Click Notification Channels again if needed.

    7. Now, select your Display name and click OK.

    8. Enter a name of your choice in the Alert policy name field.

    9. Click Next.

    10. Review the alert and click Create Policy.

    Click Check my progress to verify the objective. Create alerting policies

    Task 4. Resource groups

    In this task, you create a group in Cloud Monitoring to organize your resources.

    1. In the left pane, click Groups.
    2. Click + Create Group.
    3. Enter a name for the group. For example: VM instances
    4. In the Criteria section, type nginx in the Value field below Contains.
    5. Click DONE.
    6. Click CREATE.
    7. Review the dashboard Cloud Monitoring created for your group.

    Click Check my progress to verify the objective. Create resource groups

    Task 5. Uptime monitoring

    In this task, you create an uptime check in Cloud Monitoring to monitor the availability of your resources.

    1. In the Monitoring tab, click on Uptime Checks.
    2. Click + Create Uptime Check.
    3. Specify the following, and leave the remaining settings as their defaults:
    Property Value (type value or select option as specified)
    Protocol HTTP
    Resource Type Instance
    Applies To Group
    Group Select your group
    Check Frequency 1 minute
    1. Click on Continue to leave the other details to default. In Alert & Notification tab, select your Notification Channels from the dropdown.

    2. Click Continue.

    3. For Title, enter a name of your choice for the uptime check.

    4. Click Test to verify that your uptime check can connect to the resource.

    5. When you see a green check mark everything can connect. Click Create.

    The uptime check you configured takes a while for it to become active.

    Click Check my progress to verify the objective. Create uptime check

    Task 6. Disable the alert

    In this task, you disable an existing alert policy in Cloud Monitoring.

    Alerting policies stay active for a while after a project is deleted, just in case it needs to be reinstalled. Since this is a lab, and you will not have access to this project again, remove the alerting policy you created.

    1. Navigate to the Alerting section.

    2. Click view all Alert policies, on your Policies details page click on the Enabled toggle at the top of the page.

    3. You will be asked to confirm that you want to turn off the alerting policy - click Turn Off.

    Task 7. Review

    In this lab, you learned how to:

    • Monitor your projects
    • Create a Cloud Monitoring workspace
    • Create alerts with multiple conditions
    • Add charts to dashboards
    • Create resource groups
    • Create uptime checks for your services

    End your lab

    When you have completed your lab, click End Lab. Google Cloud Skills Boost removes the resources you’ve used and cleans the account for you.

    You will be given an opportunity to rate the lab experience. Select the applicable number of stars, type a comment, and then click Submit.

    The number of stars indicates the following:

    • 1 star = Very dissatisfied
    • 2 stars = Dissatisfied
    • 3 stars = Neutral
    • 4 stars = Satisfied
    • 5 stars = Very satisfied

    You can close the dialog box if you don't want to provide feedback.

    For feedback, suggestions, or corrections, please use the Support tab.

    Copyright 2024 Google LLC All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.

    Previous Next

    Before you begin

    1. Labs create a Google Cloud project and resources for a fixed time
    2. Labs have a time limit and no pause feature. If you end the lab, you'll have to restart from the beginning.
    3. On the top left of your screen, click Start lab to begin

    This content is not currently available

    We will notify you via email when it becomes available

    Great!

    We will contact you via email if it becomes available

    One lab at a time

    Confirm to end all existing labs and start this one

    Use private browsing to run the lab

    Use an Incognito or private browser window to run this lab. This prevents any conflicts between your personal account and the Student account, which may cause extra charges incurred to your personal account.
    Preview