Create an Alerting Policy with Cloud Monitoring

45 minutes
  • 4 Learning Objectives

About this Hands-on Lab

An alerting policy describes a set of conditions that you want to monitor within your infrastructure. Alerting policies provide granular information about your architecture that can help you troubleshoot issues if needed. In this hands-on lab, we will set up an alerting policy with the help of uptime checks on a Compute Engine instance and simulate instance failure to test it.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Create an Uptime Check

In the Cloud Monitoring Workspace, create an uptime check for your web-server instance. To quickly initialize it, limit uptime checks to the US region.

Create a Notification Channel

In the Alerting menu in your Cloud Monitoring workspace, configure either an SMS or email notification (your choice) using your cell phone number or email.

Create the Alerting Policy

In the Alerting menu inside the Cloud Monitoring workspace, create a notification channel of your preferred method (email, SMS).

Test the Alerting Policy

Test the alerting policy by stopping your web-server instance. You should automatically receive an email or SMS message that there is an incident. Further, view the incident in the Alerting menu in Cloud Monitoring.

After observing the alerts, resolve the alert by starting the instance and observe how the incident resolves itself.

Additional Resources

Your team is building a new app and wants to deploy a server for testing. They have asked you to set up monitoring on the server and configure notifications to be sent when there are issues.

You’ll need to complete the following steps to accomplish your task:

  1. Add an uptime check in Cloud Monitoring.
  2. Create a notification channel
  3. Create an alerting policy tied to our uptime check, and add the above notification channel.
  4. Simulate instance failure to test the alerting policy.

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?