Manage notifications

Stay organized with collections Save and categorize content based on your preferences.

You can configure Error Reporting to send error notifications to selected Cloud Monitoring notification channels.

Error Reporting sends notifications in the following cases:

  • When an error first occurs in a Google Cloud project, and it can't be grouped with previous errors.

  • If an error that was marked as Resolved reoccurs.

Manage notification channels

You create, edit, and delete notification channels in Monitoring. After you have created notification channels, you can configure Error Reporting to use them.

Error Reporting lets you select from two types of notification channels: email and mobile.

Before you begin

To configure a notification channel, you must have one of the following Identity and Access Management roles on the scoping project of a metrics scope:

  • Monitoring NotificationChannel Editor
  • Monitoring Editor
  • Monitoring Admin
  • Project Editor
  • Project Owner

For more information about these roles, see Access control.

Create notification channel

To create a notification channel by using the Google Cloud console, follow the channel-specific instructions contained in the following table:

Email

To add an email notification channel, do the following:

  1. In the Google Cloud console, select Monitoring

    Go to Monitoring

  2. Click Alerting and then click Edit notification channels.
  3. In the Email section, click Add new.
  4. Complete the dialog and click Save.

If you use a group email address as the notification channel for an alerting policy, then configure the group to accept mail from ErrorReportingNotifications-noreply@google.com.

Mobile App

Use the Google Cloud console Mobile App to monitor your Google Cloud console resources and Monitoring information from anywhere. Google Cloud console Mobile App notifications are either sent to a specific device or to a specific user:

List of Google Cloud console Mobile App} notification channels.

  • Device indicates that notifications are sent only to the specific device that created the notification channel. For device-scoped notification channels, the Display name field includes device information.
  • User indicates that the notifications are sent to all of your devices that have the Google Cloud console Mobile App installed.

Cloud Monitoring determines the notification scope when the channel is created. You can't select or change the scope.

To configure a Google Cloud console Mobile App notification channel for a specific Google Cloud project, do the following:

  1. Install the Google Cloud console Mobile App from your mobile device's app store.
  2. Select a project for viewing in the Google Cloud console Mobile App.

    After you select a project, a data exchange between the app and the selected Google Cloud project occurs. A notification channel is created when one doesn't exist, and after a few minutes, this channel is listed under the Mobile Devices section of the Notification channels page.

To add your mobile device as a notification channel for an alerting policy, in the alerting Notifications section, select Google Cloud console (mobile) and then choose your mobile device from the list.

Slack

To set up Slack notifications, do the following:

  1. In Slack: Create a Slack workspace and channel at the Slack site. Record the channel URL.

  2. In the Google Cloud console, select Monitoring:

    Go to Monitoring

  3. Click Alerting and then click Edit notification channels.

  4. In the Slack section, click Add new to open the Slack sign-in page:

    1. Select your Slack workspace.
    2. Click Allow to enable Cloud Monitoring access to your Slack workspace. This action takes you back to the Monitoring configuration page for your notification channel.
    3. Enter the name of the Slack channel you want to use for notifications.
    4. Enter a display name for the Slack notification channel.
    5. (Optional) To test the connection between Cloud Monitoring and your Slack workspace, click Send test notification. If the connection is successful, then you see a message This is a test alert notification... in the Slack notification channel that you specified. Check the notification channel to confirm receipt.
  5. If the Slack channel you want to use for notifications is a private channel, then you must manually invite the Monitoring app to the channel:

    1. Open Slack.
    2. Go to the channel you specified as your Monitoring notification channel.

    3. Invite the Monitoring app to the channel by entering and sending the following message in the channel:

      /invite @Google Cloud Monitoring

      Be sure you invite the Monitoring app to the private channel you specified when creating the notification channel in Monitoring. Inviting the Monitoring app to public channels is optional.

Webhooks

To configure Webhooks notifications, do the following:

  1. The webhook handler: Identify the public endpoint URL to receive webhook data from Monitoring.
  2. In the Google Cloud console, select Monitoring

    Go to Monitoring

  3. Click Alerting and then click Edit notification channels.
  4. In the Webhook section, click Add new.
  5. Complete the dialog.
  6. Click Test Connection to send a test payload to the Webhook endpoint. You can go to the receiving endpoint to verify delivery.
  7. Click Save.

Webhook schema

To view the Webhook schema structure for Error Reporting, click the following:

Basic authentication

In addition to the webhook request sent by Cloud Monitoring, basic authentication utilizes the HTTP specification for the username and password. Cloud Monitoring requires your server to return a 401 response with the proper WWW-Authenticate header. For more information about basic authentication, see the following:

Token authentication

Token Authentication requires a query string parameter in the endpoint URL and a key that the server expects to be secret between itself and Monitoring. The following is a sample URL that includes a token:

https://www.myserver.com/stackdriver-hook?auth_token=1234-abcd

If Monitoring posts an incident to the endpoint URL, your server can validate the attached token. This method of authentication is most effective when used with SSL/TLS to encrypt the HTTP request preventing snoopers from learning the token.

For an example server in Python, see this sample server.

Edit and delete notification channels

To edit or delete a notification channel by using the Google Cloud console, do the following:

  1. In the Google Cloud console, select Monitoring, or click the following button:

    Go to Monitoring

  2. In the Monitoring navigation pane, click Alerting.

  3. Click Edit notification channels.

    The Notification channels dashboard contains a section for each type of notification channel. Each section lists all configurations for that type:

    • To modify an entry, click Edit . Click Save after your changes are complete.
    • To delete an entry, click Delete . Click Delete in the confirmation dialog.

Select notification channels through the Google Cloud console

To select an existing notification channel, you must have one of the following roles:

  • Error Reporting User
  • Error Reporting Admin
  • Project Editor
  • Project Owner

To select where you want to send notifications when new error groups occur, complete the following steps.

  1. Go to Error Reporting:

    Go to Error Reporting

  2. Click Configure notifications to open the Error notifications page.

  3. In the Notification channels drop-down menu, select the channels that you want to send the notifications to.

    If you don't see the channel you need, click Manage notification channels to create a new channel. To create a notification channel, your role must be one those listed in Creating channels.

  4. After selecting the channels, click Save.

Additional information

Following is additional information that applies when creating and managing notifications in Error Reporting.

Notification limit

If more than 5 errors reoccur in a Google Cloud project within an hour, Error Reporting sends a final notification, letting you know that no more notifications will be sent for the next 6 hours. This is to control the volume of notifications.

Resolution status

If an error with a resolution status of Resolved reoccurs, even if it has been previously deleted, its resolution status changes back to Open and Error Reporting sends a notification.

Error Reporting won't send a notification if a Muted error reoccurs.

To manage the resolution status of your errors, go to Manage errors.

Mobile notifications

Error Reporting sends mobile notifications to the Google Cloud app on Android and iOS. To opt into mobile notifications, you must first install the app on your mobile device:

Download the Google Cloud app

GCP console mobile app illustration. GCP console mobile app details.