Configure log-based alert policy
Use log-based alerts to notify you whenever a specific message appears in your included logs. For example, if you want to know when an audit log records a particular data-access message, you can create a log-based alert that matches the message and notifies you when it appears.
Before you begin
Role required: Responder, Manager, or Administrator
- Log in to the Google Cloud console.
On the navigation pane, click
.The Logs Explore page appears.
Click Create alert.
The Create log-based alert policy form appears.
- Under the Alert details section, in the Alert Policy Name field, enter a name for the policy and click NEXT.
- Under the Choose logs to include in the alert section, in the Define log entries to alert on field, enter the condition to determine which logs are included in alert policy and click NEXT.
- Under the Set notification frequency and autoclose duration section, configure the notification frequency and autoclose duration as required and click NEXT.
Under the Who should be notified section, in the Notification
Channels list, select channel for which you have configured the
webhook and click OK.
- Click SAVE.
A log-based alert policy is created.