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 apply a snooze to a metric-based alerting policy, Monitoring also closes all incidents related to the alerting policy.

You can create a snooze by doing any of the following:

  • To apply the snooze to multiple alerting policies, create it from the Alerting page, the gcloud CLI, or the Cloud Monitoring API. You can also choose when the snooze begins and define the snooze duration.

    Applying the snooze to multiple alerting policies might be helpful when you you have planned maintenance and need the snooze to begin at a specific time and last for a predetermined duration.

  • To apply a snooze to a specific incident, create the snooze from the Incident details page of an open incident. In this case, all snooze fields are preconfigured except the duration.

    Applying the snooze from a specific incident might be helpful when you have an escalating outage and need to immediately snooze an alerting policy until related issues have been resolved.

Components of snoozes

A snooze has four 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.

  • An optional label-based filter, configured on the Incident details page. You can use resource labels to apply the snooze to incidents that have the same labels and are associated with the same alerting policy as the incident that you are viewing. For more information, see Create a snooze.

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 applied to an alerting 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