Is it possible to add constraints to alerts policies so they only apply during a certain time of day (i.e. business hours)?
I have a project that processes inbound contacts from a 3rd-party Hubspot (CRM) via webhooks. Team members follow up with these contacts working a queue during business hours (8am - 5pm) as quickly as possible. The other day we discovered an issue with the CRM and a workflow was deleted, so contacts were not delivered for a couple hours before a team member flagged it and we restored the connection.
To minimize the potential delay before alerting, we decided to add a Stackdriver log metric, and alert policy, whenever the SUM of contacts within 10 minutes window was below an acceptable threshold. The contacts primarily come in via Google Ads campaigns driving traffic to the inbound landing pages (Hubspot) during business hours, and then volume reduced after hours. It is expected that after business hours the rate will decrease, so we don't want alerts for these false negative scenarios.
Reviewing the app and docs, I cannot find any way to add another condition like IF hour AFTER 8AM; IF hour BEFORE 6PM so just curious how one would limit the notifications to business hours.
Thanks,
Mike