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


  1. Log in to the Google Cloud console.
  2. On the navigation pane, click Logging > Logs Explorer.
    The Logs Explore page appears.
  3. Click Create alert.
    Option to create an alert.
    The Create log-based alert policy form appears.
    Window to create log-based alert policy.
  4. Under the Alert details section, in the Alert Policy Name field, enter a name for the policy and click NEXT.
  5. 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.
  6. Under the Set notification frequency and autoclose duration section, configure the notification frequency and autoclose duration as required and click NEXT.
  7. Under the Who should be notified section, in the Notification Channels list, select channel for which you have configured the webhook and click OK.
    Section to select notification channel for which you have configured the webhook .
  8. Click SAVE.


A log-based alert policy is created.