Creating 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 allow you to include granular information about your architecture to help 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 then simulate instance failure to test that policy and see if it generates the desired notifications via email and SMS.

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 Cloud Monitoring workspace, configure an SMS and email notification using your cell phone number and email.

Create the Alerting Policy

In the Cloud Monitoring workspace, create a notification channel using SMS and email.

Test the Alerting Policy

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

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 your 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?