Forum Discussion
debashish2021
Jun 29, 2021Copper Contributor
Ability to alert on weekday and weekend schedule with variable frequency ( cron job)
Hi,
I am using Log Analytics to write some queries (KQL) and based on the outcome of the query send alerts.
I want different alerts based on weekdays , weekends and different frequency.
So for example I want to set up the following alerts on the same query
1) Weekdays (MON-FRI) 8 AM - 8 PM - frequency every 15 minutes
2) Weekdays (After hours) 8PM - 8 AM - frequency every 1 hour
3) Weekends ( SAT-SUN) - frequency every hour
Is it possible through Azure Alert rules . I don't see any setup for custom frequency .
Thanks
2 Replies
- Anders BengtssonFormer EmployeeHi,
You will need to use multiple rules, with different rules. To get weekday and office hours into your query, see http://contoso.se/blog/?p=4585 for an example.
Also, if you have not already, look into Action Rules, which can be used to control alert rules.- debashish2021Copper Contributor
Anders Bengtsson Thanks for your reply. We have used exactly the same mechanism of handing it in query .