Snoozing alerting over weekends

Hi!

I am having a Cloud Run job that runs every working day at 8 am. I created log based metric to check if it runs successfully. I am about to create an alert based on that metric, however, I couldn’t find a way to snooze the alerting over the weekends. Is there any built-in mechanism to do so?

1 Like

Please try to create a Snooze time for the weekend. This option is available in the GCP Console → Alerting page.

Thanks,
Darwin.

Hi Darwin!

Thank you! Surely, there is a snoozing option to make a one-time snooze, but I cannot find any possible OOTB solution to make it recurring. I have found a proposal for making job scheduler or Cloud Scheduler to run a script for that - https://cloud.google.com/monitoring/alerts/manage-snooze#recur

However, I found this small feature quite overkilling to make such. Thus I am looking for something easier to setup.

1 Like

Hi @robal ,

Welcome to Google Cloud Community!

You have already checked the relevant documentation for snooze creation that aligns on your goal. As stated here: After an alerting policy is enabled, Monitoring continuously monitors the conditions of that policy. You can’t configure the alerting policy to monitor conditions only for certain time periods. If you want to disable the alerting policy for a certain time period, then create a snooze*. See also* Components of snoozes.

Another recommendation is to try the use of the Snooze API in combination with Cron Jobs:

API - to schedule a reoccurring snooze, you can create a cron job for scheduling by using the API. A Snooze will prevent any alerts from being opened, and close any that are already open.

IAM - to ensure permissions are granted during the snooze creation.

And sharing with you the feature request created that echos similarity on your concern. However, we do not have an ETA for the implementation of this feature request. In case you want to report a new issue, please do not hesitate to create a new Issue Tracker thread describing your issue.

For more detailed insights you may reach out to Google Cloud Support for assistance.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.

1 Like