[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-07-17。"],[],[],null,["# Snooze notifications and incidents\n\nThis document describes snoozes, which let you prevent Cloud Monitoring\nfrom creating [incidents](/monitoring/alerts/incidents-events) and issuing notifications\nduring specific time periods. You can create and manage your snoozes by using\nthe Google Cloud console, the Google Cloud CLI, and the Cloud Monitoring API.\n\nWhen to snooze alerting policies\n--------------------------------\n\n[Create a snooze](/monitoring/alerts/manage-snooze) when you want to temporarily prevent\nincidents from being created and notifications from being sent, or to\nprevent [repeated notifications](/monitoring/alerts/policies-in-api#send-repeated-notifications) from being sent for\nan open incident. For example, you might create a snooze in the following\nsituations:\n\n- You have planned maintenance.\n- You have an escalating outage and you want to prevent further incidents and notifications.\n\nHow snoozes work\n----------------\n\nWhen a snooze for an alerting policy is active, Monitoring\ndoesn't send notifications or create incidents for the snoozed alerting\npolicy. When you apply a snooze to a metric-based or SQL-based alerting policy,\nMonitoring also closes all incidents related to the\nalerting policy.\n\nYou can create a snooze by doing any of the following:\n\n- To apply the snooze to multiple alerting policies, create it from the\n **Alerting** page, the gcloud CLI, or the Cloud Monitoring API.\n You can also choose when the snooze begins and define the snooze duration.\n\n Applying the snooze to multiple alerting policies might be helpful when you\n you have planned maintenance and need the snooze to begin at a specific\n time and last for a predetermined duration.\n- To apply a snooze to a specific incident, create the snooze from the\n **Incident details** page of an open incident. In this case,\n all snooze fields are preconfigured except the duration.\n\n Applying the snooze from a specific incident might be helpful when you\n have an escalating outage and need to immediately snooze an alerting policy\n until related issues have been resolved.\n\n### Components of snoozes\n\nA snooze has the following components:\n\n- A name. We recommend that you use this field to describe the purpose of the\n snooze.\n\n- A period that determines when the snooze is active. It's specified by a\n start time and a duration. An active snooze prevents\n Monitoring from creating incidents\n and issuing notifications for alerting policies that match the criteria of the\n snooze. Outside the active period, the snooze is inactive.\n An *inactive* snooze doesn't affect when incidents are created and\n notifications are sent.\n\n- Criteria for the snooze, which includes the following:\n\n - A list of alerting policies to which the snooze applies.\n\n - An optional label-based filter that can be used when the snooze applies to a single alerting policy. You define the filter's\n labels to snooze incidents with matching labels. For example,\n suppose a filter includes a label for a specific virtual machine (VM)\n instance ID and that the snooze is active. The alerting policy can still\n create incidents for all VMs except the one listed in the filter.\n\n A label-based filter can include resource and metric labels. When the\n alerting policy isn't PromQL-based, the filter can also include metadata\n labels.\n\nHow snoozes affect alerting policy conditions\n---------------------------------------------\n\nThe following table describes the relationship between the status of a\ncondition in a single-condition alerting policy and when incidents are\ncreated and notifications are sent:\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nWhen a snooze is applied to an alerting policy that contains\n[multiple conditions](/monitoring/alerts/concepts-indepth#condition-combiners), the rules to combine the\nconditions are enforced first. Next, the rules associated with snoozes are\napplied.\n\nHow creating a snooze differs from disabling a policy\n-----------------------------------------------------\n\nTo prevent notifications from a collection of alerting policies\nfor a short interval, you can manually disable each alerting policy\nor you can create a snooze:\n\n- If you choose to manually disable the alerting policies, then you must\n remember to\n manually enable each disabled alerting policy at the end of the interval.\n Also, you\n can only schedule these actions if you use the Cloud Monitoring API and\n configure something to issue the API call at a specific time.\n\n- If you create a snooze, you can schedule the active period, and the\n snooze can apply to multiple alerting policies. When the snooze is inactive\n or when an active snooze ends, the alerting policies associated with\n the snooze behave normally. That is, these alerting policies can\n create incidents and send notifications.\n\nWhen you have periodic maintenance windows, for each window, you can\nmanually disable and enable the alerting policies that shouldn't\nsend notifications. However, if you create a snooze for one\nmaintenance window, you can copy that snooze and update the start time and\nduration of the copy. That is, by creating one snooze and copying it, you can\nschedule a series of upcoming snoozes for the same collection of\nalerting policies.\n\nTo view a record of when alerting policies are disabled or enabled, you must\nquery the Audit Logs of the Google Cloud project. However, when you create a snooze,\nthat snooze is added to the [historical record of snoozes](/monitoring/alerts/manage-snooze#list)\nfor your Google Cloud project. You can view the historical record,\nwhich shows your past, active, and upcoming snoozes,\nby using the Google Cloud console.\n\nRestrictions\n------------\n\n- The duration of a snooze must be a single interval that is a multiple of\n minutes.\n\n- A snooze can only be applied to 16 alerting\n policies.\n\n- The criteria of a snooze can't be modified.\n\n- When applying a snooze to an alerting policy with a PromQL-based condition,\n you can't use metadata labels in the filter.\n\nWhat's next\n-----------\n\n- [Create and manage snoozes](/monitoring/alerts/manage-snooze)\n- [Alerting overview](/monitoring/alerts)"]]