From 3d97ee55eba8148c3ddd21a1e65202bc8855523d Mon Sep 17 00:00:00 2001 From: Ben Ridley Date: Tue, 13 Oct 2020 12:21:53 +1100 Subject: [PATCH] Update docs to include mute time sections Signed-off-by: Ben Ridley --- docs/configuration.md | 66 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/docs/configuration.md b/docs/configuration.md index 303de67c..d6e41102 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -113,6 +113,10 @@ receivers: # A list of inhibition rules. inhibit_rules: [ - ... ] + +# A list of mute time intervals for muting routes +mute_time_intervals: + [ - ... ] ``` ## `` @@ -168,6 +172,12 @@ match_re: # been sent successfully for an alert. (Usually ~3h or more). [ repeat_interval: | default = 4h ] +# Times when the route should be muted. These must match a name of a +# mute time interval defined in the mute_time_intervals section. +# Additionally, the root node cannot have any mute times. +mute_times: + [ - ...] + # Zero or more child routes. routes: [ - ... ] @@ -202,6 +212,62 @@ route: team: frontend ``` +## `` + +A `mute_time_interval` specifies a named interval of time that may be referenced +in the routing tree to mute particular routes for particular times of the day. + +```yaml +name: +time_intervals: + [ - ... ] + +``` +## `` +A `time_interval` contains the actual definition for an interval of time. The syntax +supports the following fields: + +```yaml +- times: + [ - ...] + weekdays: + [ - ...] + days_of_month: + [ - ...] + months: + [ - ...] + years: + [ - ...] +``` + +All these fields are optional and if left unspecified allow any value to match the interval. +Some fields support ranges and negative indices, and are detailed below: + +`times`: A list of time-ranges. They are inclusive of the starting time and exclusive +of the ending time to make it easy to represent times that start/end on hour boundaries. +For example, start_time: '17:00' and end_time: '24:00' will begin at 17:00 and finish +immediately after 23:59. They are specified like so: + + times: + - start_time: HH:MM + end_time: HH:MM + +`weekdays`: A list of days of the week, where the week begins on Sunday and ends on Saturday. +Days should be specified by name (e.g. ‘Sunday’). For convenience, ranges are also accepted +of the form : and are inclusive on both ends. For example: +`[‘monday:wednesday','saturday', 'sunday']` + +`days_of_month`: A list of numerical days in the month. Days begin at 1. +Negative values are also accepted which begin at the end of the month, +e.g. -1 during January would represent January 31. For example: `['1:5', '-3:-1']`. +Extending past the start or end of the month will cause it to be clamped. E.g. specifying +`['1:31']` during February will clamp the actual end date to 28 or 29 depending on leap years. + +`months`: A list of calendar months identified by a case-insentive name (e.g. ‘January’) or by number, +where January = 1. Ranges are also accepted. For example, `['1:3', 'may:august', 'december']` + +`years`: A numerical list of years. Ranges are accepted. For example, `['2020:2022', '2030']` + ## `` An inhibition rule mutes an alert (target) matching a set of matchers