This document shows you how to create an alerting policy that notifies you when an uptime check fails. The steps described in this document assume that you have an uptime check that you want to monitor. For information about creating uptime checks, see the following documents:
We recommend that you create alerting policies to monitor your uptime checks. When you create an uptime check by using the Google Cloud console, you have the option to create an alerting policy. However, you can create an alerting policy for any uptime check by following the instructions in this document.
Before you begin
-
To get the permissions that you need to create and modify alerting policies by using the Google Cloud console, ask your administrator to grant you the Monitoring Editor (
roles/monitoring.editor
) IAM role on your project. For more information about granting roles, see Manage access to projects, folders, and organizations.You might also be able to get the required permissions through custom roles or other predefined roles.
For more information about Cloud Monitoring roles, see Control access with Identity and Access Management.
Ensure that you have configured the notification channels that you want to use for the alerting policy. For information about configuring notification channels, see Create and manage notification channels.
Create an alerting policy
To create an alerting policy that notifies you when an uptime check fails, do the following:
-
In the Google Cloud console, go to the Uptime checks page:
If you use the search bar to find this page, then select the result whose subheading is Monitoring.
Locate the uptime check that you want to monitor, click more_vert More , and select Add alert policy.
The alerting policy configuration dialog opens and the Condition is pre-configured.
In the navigation pane of the dialog, select Notifications and name.
Add your notification channels, enter a name for the alerting policy. You can also add documentation that you want included in notifications.
View or edit an alerting policy
To view details of the alerting policy, open the details page of the uptime check, go to the Alert Policies pane, and then select the policy.
-
In the Google Cloud console, go to the notifications Alerting page:
If you use the search bar to find this page, then select the result whose subheading is Monitoring.
- Locate the alerting policy that you want to view or modify and then select its name.
- Optional: To change who is notified, the documentation, or the condition of an alerting policy, click edit Edit.
What's next
For information about charting uptime metrics, see Chart uptime-check metrics.