These new channels join our existing Error Reporting notification capabilities of email and the Google Cloud Console mobile app.
What do I have to do to enable Error Reporting and these notifications?
Error Reporting is automatically enabled as soon as logs that contain error events like stack traces are ingested into Cloud Logging. Alternatively, you can self configure Error Reporting for a new project if you won’t be using Cloud Logging.
To configure the new notification channels, see documentation here for Slack and Webhooks, or keep reading below:
Enabling Slack
In Slack: Create a Slack workspace and channel at the Slack site. Record the channel URL.
In the Cloud Console, select Monitoring.
Click Alerting and then click Edit notification channels.
In the Slack section, click Add new to open the Slack sign-in page:
Select your Slack workspace.
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.
Enter the name of the Slack channel you want to use for notifications.
Enter a display name for the Slack notification channel.
(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.
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:
Open Slack.
Go to the channel you specified as your Monitoring notification channel.
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.
Enabling Webhooks
The webhook handler: Identify the public endpoint URL to receive webhook data from Monitoring.
In the Cloud Console, select Monitoring.
Click Alerting and then click Edit notification channels.
In the Webhook section, click Add new.
Complete the dialog.
Click Test Connection to send a test payload to the Webhook endpoint. You can go to the receiving endpoint to verify delivery.
Click Save.
Webhook schema
The Webhook schema structure for Error Reporting, is as follows:
Schema structure, version 1.0