Get notified if your app stops responding

Learn how to get notified if your application stopsresponding to HTTP requests by completing the followingtasks:

  1. Create an email notification channel.
  2. Create an uptime check and an alerting policy.
  3. View the uptime check dashboard.
  4. Force the uptime check to fail.
  5. View the email notification and the incident.
  6. Clean up.

To follow step-by-step guidance for this task directly in the Google Cloud console, clickGuide me:

Guide me


Before you begin

  1. 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.
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud 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.create permission.Learn how to grant roles.
    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.

    Go to project selector

  3. Verify that billing is enabled for your Google Cloud project.

  4. 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.enable permission.Learn how to grant roles.

    Enable the API

  5. In the Google Cloud console, on the project selector page, select or create a Google Cloud 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.create permission.Learn how to grant roles.
    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.

    Go to project selector

  6. Verify that billing is enabled for your Google Cloud project.

  7. 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.enable permission.Learn how to grant roles.

    Enable the API

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:
  1. In the Google Cloud console, go to the Alerting page:

    Go toAlerting

    If you use the search bar to find this page, then select the result whose subheading isMonitoring.

  2. In the toolbar, clickEdit Notification Channels.
  3. On theNotification channels page, scroll toEmail, and then clickAdd new.
  4. Enter your email address, a display name such asMy 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:

  1. In the Google Cloud console, go to the Uptime checks page:

    Go toUptime checks

    If you use the search bar to find this page, then select the result whose subheading isMonitoring.

  2. In the toolbar, clickCreate uptime check.
  3. For theResource Type, selectURL.
  4. For theHostname, enter a valid URL for your company, or entercloud.google.com.
  5. 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 tocloud.google.com/monitoring/docs.

  6. ClickContinue to advance to theResponse validation section.

    For information about these settings, seeValidate response data.

  7. ClickContinue to advance to theAlert & Notification section.
  8. Expand theNotification channels menu and select your notification channel.
  9. ClickContinue to advance to theReview section.
  10. Enter a title, such asMy check, for the uptime check.
  11. To verify your uptime check configuration, clickTest.

    If you receive an error, seeVerify your uptime check.

  12. 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:

  1. In the Google Cloud console, go to the Uptime checks page:

    Go toUptime checks

    If you use the search bar to find this page, then select the result whose subheading isMonitoring.

  2. 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.

  3. In the toolbar, enable auto-refresh on the charts by clickingEnable auto refresh.

  4. 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:

  1. In the toolbar, clickEdit.
  2. In thePath field, append or enterHelloWorld.
  3. ClickSave.
  4. In the toolbar, enable auto-refresh on the charts by clickingEnable auto refresh.
  5. 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:

  1. Open your email account, and view the message whose title starts with[ALERT] Failure of uptime check_id.
  2. 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:

  1. Delete the uptime check that you created:

    1. In the Google Cloud console, go to the Uptime checks page:

      Go toUptime checks

      If you use the search bar to find this page, then select the result whose subheading isMonitoring.

    2. Select the uptime check that you created, and then clickDelete.

      When you delete an uptime check, you also delete the alerting policy that monitors that uptime check.

What's next

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.