Get notified if your app stops responding
Learn how to get notified if your application stopsresponding to HTTP requests by completing the followingtasks:
- Create an email notification channel.
- Create an uptime check and an alerting policy.
- View the uptime check dashboard.
- Force the uptime check to fail.
- View the email notification and the incident.
- Clean up.
To follow step-by-step guidance for this task directly in the Google Cloud console, clickGuide me:
Before you begin
- Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Note: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
- Create a project: To create a project, you need the Project Creator role (
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission.Learn how to grant roles.
Verify that billing is enabled for your Google Cloud project.
Enable the Cloud Monitoring API.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin), which contains theserviceusage.services.enablepermission.Learn how to grant roles.In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Note: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
- Create a project: To create a project, you need the Project Creator role (
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission.Learn how to grant roles.
Verify that billing is enabled for your Google Cloud project.
Enable the Cloud Monitoring API.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin), which contains theserviceusage.services.enablepermission.Learn how to grant roles.
Create an email notification channel
Before you create an alerting policy, configure the notification channels that you want thealerting policy to use. Cloud Monitoring supports many different types of notificationchannels, including email, Slack, PagerDuty, and Pub/Sub. For more information, seeCreate and manage notification channels.To get notifications by e-mail, do the following:In the Google Cloud console, go to thenotifications Alerting page:
If you use the search bar to find this page, then select the result whose subheading isMonitoring.
- In the toolbar, clickEdit Notification Channels.
- On theNotification channels page, scroll to
Email , and then clickAdd new. - Enter your email address, a display name such as
My email, and then clickSave.
Create an uptime check and alerting policy
To be notified when an application fails to respond to requests, configurean uptime check to send requests to the application, and then configure analerting policy to monitor the responses to the uptime check:
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 isMonitoring.
- In the toolbar, clickCreate uptime check.
- For theResource Type, selectURL.
- For theHostname, enter a valid URL for your company, or enter
cloud.google.com. - If you entered the URL for your company, leave thePath field empty. Otherwise, enter
/monitoring/docs.The uptime check is configured to either send requests to the URL for your company, or to
cloud.google.com/monitoring/docs. - ClickContinue to advance to theResponse validation section.
For information about these settings, seeValidate response data.
- ClickContinue to advance to theAlert & Notification section.
- Expand theNotification channels menu and select your notification channel.
- ClickContinue to advance to theReview section.
- Enter a title, such as
My check, for the uptime check. To verify your uptime check configuration, click
Test .If you receive an error, seeVerify your uptime check.
- ClickCreate.
Your uptime check and alerting policy are created, and your new uptime checkis listed on theUptime checks page.
View the uptime check dashboard
TheUptime checks page displays a list of your uptime checks and thestatus of each check. To view the detailed status of the uptime check youcreated, 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 isMonitoring.
Click the name of the uptime check to open the uptime-check's dashboard.
Because your uptime check hasn't executed, the charts are empty and thestatus for the uptime check isNo checks have run.
In the toolbar, enable auto-refresh on the charts by clickingEnable auto refresh.
Wait until a few data points appear on the charts, and then refresh thepage.
When the status for each location isPass,proceed to the next step. Otherwise, wait a minute andrefresh the page to update the status pane.
Force the uptime check to fail
To force the uptime-check to fail, modify thePath such that the URLtested by the uptime check is invalid:
- In the toolbar, clickEdit.
- In thePath field, append or enterHelloWorld.
- ClickSave.
- In the toolbar, enable auto-refresh on the charts by clickingEnable auto refresh.
Wait until the data points on thePassed Checks chart goes tozero, and then refresh the page.
When the status for each location isFail.proceed to the next step. Otherwise, wait a minute andrefresh the page to update the status pane.
View the notification and incident
After the alerting policy determines that the uptime check has had twoconsecutive failures, Cloud Monitoring creates an incident and sendsnotifications.Anincident is a record of an alerting policy that triggers, and itcontains information that is useful for troubleshooting failures. To viewthe notification and incident, do the following:
- Open your email account, and view the message whose title starts with
[ALERT] Failure of uptime check_id. To get details about the failure, in the notification,clickView incident.
TheIncident details page opens in a new page of theCloud console.
You have successfully created an uptime check and an alerting policy, youforced the uptime check to fail, and you've received a notification.You can now close the browser page that displays theIncident details page,
Clean up
To avoid incurring charges to your Google Cloud account for the resources used on this page, follow these steps.
If you created a new project and you no longer need the project, thendelete the project.
If you used an existing project, then do the following:
Delete the uptime check that you created:
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 isMonitoring.
- Select the uptime check that you created, and then click
Delete .When you delete an uptime check, you also delete the alerting policy that monitors that uptime check.
What's next
To learn how to view and customize dashboards for your VMs,see the quickstartView and customize VM instance dashboards.
To learn about testing your applications, seeSynthetic monitoring overview.
To learn how to install the Ops Agent and collect metrics from anApache server, see the quickstartCollect Apache metrics with the Ops Agent.
To learn about the Ops Agent, seeOps Agent overview.
To learn about creating custom dashboards,seeManage custom dashboards.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-19 UTC.