Snooze notifications and incidents

This document describes snoozes, which let you prevent Cloud Monitoring from creating incidents and issuing notifications during specific time periods. You can create and manage your snoozes by using the Google Cloud console, the Google Cloud CLI, and the Cloud Monitoring API.

When to snooze alerting policies

Create a snooze when you want to temporarily prevent incidents from being created and notifications from being sent, or to prevent repeated notifications from being sent for an open incident. For example, you might create a snooze in the following situations:

  • You have planned maintenance.
  • You have an escalating outage and you want to prevent further incidents and notifications.

How snoozes work

When a snooze for an alerting policy is active, Monitoring doesn't send notifications or create incidents for the snoozed alerting policy. When you snooze a metric-based alerting policy, Monitoring also closes all incidents related to the alerting policy.

When you create a snooze from the Alerting page, the gcloud CLI, or the Cloud Monitoring API, you can choose when the snooze begins, the snooze duration, and select the alerting policies to which the snooze applies. When you use the Incident details page of an open incident, all snooze fields are preconfigured except the duration. The snooze begins as soon as you create the snooze.

A snooze has three components:

  • A name. we recommend that you use this field to describe the purpose of the snooze.

  • A period that determines when the snooze is active. It's specified by a start time and a duration. An active snooze prevents Monitoring from creating incidents and issuing notifications for alerting policies that match the criteria of the snooze. Outside the active period, the snooze is inactive. An inactive snooze doesn't affect when incidents are created and notifications are sent.

  • Criteria that determines the alerting policies to which the snooze applies.

When you have planned maintenance, create a snooze from the Alerting page, the gcloud CLI, or the Cloud Monitoring API. You can specify the snooze name, criteria, start time, and duration.

When you have an escalating outage, create a snooze from the details page of the open incident. These snoozes prevent further incidents and notifications. They apply only to the related alerting policy and you specify only the duration.

How snoozes affect alerting policy conditions

The following table describes the relationship between the status of a condition in a single-condition alerting policy and when incidents are created and notifications are sent:

State Action
Condition isn't met Existing behavior

When an incident is open, close it and send incident-closure notifications.

Condition is met and
Policy isn't associated with an active snooze
Existing behavior

When an incident doesn't exist, create one and send notifications.

Condition is met and
Policy is associated with an active snooze
  • When an incident doesn't exist, don't create one and don't send notifications.
  • When an incident is open, close it and send incident-closure notifications.

When a snooze is associated with a policy that contains multiple conditions, the rules to combine the conditions are enforced first. Next, the rules associated with snoozes are applied.

How creating a snooze differs from disabling a policy

To prevent notifications from a collection of alerting policies for a short interval, you can manually disable each alerting policy or you can create a snooze:

  • If you choose to manually disable the alerting policies, then you must remember to manually enable each disabled alerting policy at the end of the interval. Also, you can only schedule these actions if you use the Cloud Monitoring API and configure something to issue the API call at a specific time.

  • If you create a snooze, you can schedule the active period, and the snooze can apply to multiple alerting policies. When the snooze is inactive or when an active snooze ends, the alerting policies associated with the snooze behave normally. That is, these alerting policies can create incidents and send notifications.

When you have periodic maintenance windows, for each window, you can manually disable and enable the alerting policies that shouldn't send notifications. However, if you create a snooze for one maintenance window, you can copy that snooze and update the start time and duration of the copy. That is, by creating one snooze and copying it, you can schedule a series of upcoming snoozes for the same collection of alerting policies.

To view a record of when alerting policies are disabled or enabled, you must query the Audit Logs of the Google Cloud project. However, when you create a snooze, that snooze is added to the historical record of snoozes for your Google Cloud project. You can view the historical record, which shows your past, active, and upcoming snoozes, by using the Google Cloud console.

Restrictions

  • The duration of a snooze must be a single interval that is a multiple of minutes.

  • A snooze can only be applied to 16 alerting policies.

  • The criteria of a snooze can't be modified.

What's next