Thank you all for your feedback on the Alertmanager Time Interval design doc so far. The design has been greatly simplified and (in my opinion) improved already due to the feedback received.
I've made some changes to the proposed implementation so that it works on receivers now, not the routes themselves. Brian pointed out that this approach requires users to define many of their routes twice, with the only difference being the active time interval and which receiver to use. For example, notice how in the below snippet the 'severity: warning' alerts have two routes but really all that needs to change is the receiver and time:
- match:
severity: warning
time_intervals:
include:
- business_hours
exclude:
- public_holidays
receiver: team-X-pager
continue: true
- match:
severity: warning
receiver: team-X-slack
time_intervals:
exclude:
- business_hours
So the current proposal is to introduce a 'timed_receivers' section of a route that pairs receivers and time intervals. This way the above route is simplified into a single block:
- match:
severity: warning
receiver: team-X-slack
timed_receivers:
- receiver: team-X-pager
include_intervals:
- business_hours
exclude_intervals:
- public_holidays
Additionally, this approach maintains the desirable characteristics of previous solutions in that it has no impact on existing routing decisions. Adding the tag also maintains backwards compatibility for existing configurations.
Cheers,
Ben