Hello,
I am looking into suppressing an alert the following way:
- Monday, Tuesday, Wednesday, Thursday, Friday it should be suppressed before 07:00 UTC and after 19:00 UTC.
- Saturday, Sunday it should be suppressed before 09:00 UTC and after 17:00 UTC.
The way I am trying to achieve this is via two separate action rules with the following schedule (Terraform snippet):
suppression {
recurrence_type = "Weekly"
schedule {
start_date_utc = "2021-01-01T19:00:00Z"
end_date_utc = "2026-01-01T07:00:00Z"
recurrence_weekly = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"]
}
}
suppression {
recurrence_type = "Weekly"
schedule {
start_date_utc = "2021-01-01T17:00:00Z"
end_date_utc = "2026-01-01T09:00:00Z"
recurrence_weekly = ["Saturday", "Sunday"]
}
}
As you'll notice the start time is 19:00 / 17:00 UTC and the end time is 07:00 / 09:00 UTC. I am doing this to avoid creating 4 rules, two for the start of day (e.g. 00:00 - 07:00 / 00:00 - 09:00 and 19:00 - 23:59 / 17:00 - 23:59) however I am not completely sure (and it's rather difficult to test) that this will work as expected.
The alternative with the 4 rules would look as follows:
suppression {
recurrence_type = "Weekly"
schedule {
start_date_utc = "2021-01-01T00:00:00Z"
end_date_utc = "2026-01-01T07:00:00Z"
recurrence_weekly = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"]
}
}
suppression {
recurrence_type = "Weekly"
schedule {
start_date_utc = "2021-01-01T19:00:00Z"
end_date_utc = "2026-01-01T23:59:59Z"
recurrence_weekly = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"]
}
}
suppression {
recurrence_type = "Weekly"
schedule {
start_date_utc = "2021-01-01T00:00:00Z"
end_date_utc = "2026-01-01T09:00:00Z"
recurrence_weekly = ["Saturday", "Sunday"]
}
}
suppression {
recurrence_type = "Weekly"
schedule {
start_date_utc = "2021-01-01T17:00:00Z"
end_date_utc = "2026-01-01T23:59:59Z"
recurrence_weekly = ["Saturday", "Sunday"]
}
}
Any help with this question is appreciated.
Thank you,
Cosmin