Update docs to include mute time sections
Signed-off-by: Ben Ridley <benridley29@gmail.com>
This commit is contained in:
parent
11c24d4ae6
commit
3d97ee55eb
|
@ -113,6 +113,10 @@ receivers:
|
||||||
# A list of inhibition rules.
|
# A list of inhibition rules.
|
||||||
inhibit_rules:
|
inhibit_rules:
|
||||||
[ - <inhibit_rule> ... ]
|
[ - <inhibit_rule> ... ]
|
||||||
|
|
||||||
|
# A list of mute time intervals for muting routes
|
||||||
|
mute_time_intervals:
|
||||||
|
[ - <mute_time_interval> ... ]
|
||||||
```
|
```
|
||||||
|
|
||||||
## `<route>`
|
## `<route>`
|
||||||
|
@ -168,6 +172,12 @@ match_re:
|
||||||
# been sent successfully for an alert. (Usually ~3h or more).
|
# been sent successfully for an alert. (Usually ~3h or more).
|
||||||
[ repeat_interval: <duration> | default = 4h ]
|
[ repeat_interval: <duration> | 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:
|
||||||
|
[ - <string> ...]
|
||||||
|
|
||||||
# Zero or more child routes.
|
# Zero or more child routes.
|
||||||
routes:
|
routes:
|
||||||
[ - <route> ... ]
|
[ - <route> ... ]
|
||||||
|
@ -202,6 +212,62 @@ route:
|
||||||
team: frontend
|
team: frontend
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## `<mute_time_interval>`
|
||||||
|
|
||||||
|
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: <string>
|
||||||
|
time_intervals:
|
||||||
|
[ - <time_interval> ... ]
|
||||||
|
|
||||||
|
```
|
||||||
|
## `<time_interval>`
|
||||||
|
A `time_interval` contains the actual definition for an interval of time. The syntax
|
||||||
|
supports the following fields:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- times:
|
||||||
|
[ - <time_range> ...]
|
||||||
|
weekdays:
|
||||||
|
[ - <weekday_range> ...]
|
||||||
|
days_of_month:
|
||||||
|
[ - <days_of_month_range> ...]
|
||||||
|
months:
|
||||||
|
[ - <month_range> ...]
|
||||||
|
years:
|
||||||
|
[ - <year_range> ...]
|
||||||
|
```
|
||||||
|
|
||||||
|
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 <start_day>:<end_day> 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']`
|
||||||
|
|
||||||
## `<inhibit_rule>`
|
## `<inhibit_rule>`
|
||||||
|
|
||||||
An inhibition rule mutes an alert (target) matching a set of matchers
|
An inhibition rule mutes an alert (target) matching a set of matchers
|
||||||
|
|
Loading…
Reference in New Issue