You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Alerting: Add support for nested notification policies (#599)
* Define schema for depth 1 policy tree
* Support for depth 1 policy tree
* Support for matchers and implement tests
* Workaround for linearization issue
* Tests for sibling nested policies, remove commented out workaround
* Support for 2-depth trees
* Remove debug error
* Complete remaining TODOs
* Regenerate docs
* Set supported tree depth to 4
* Fix bug exposed by increased depth
-`group_interval` (String) Minimum time interval between two notifications for the same group. Default is 5 minutes.
48
96
-`group_wait` (String) Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
97
+
-`policy` (Block List) Routing rules for specific label sets. (see [below for nested schema](#nestedblock--policy))
49
98
-`repeat_interval` (String) Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
50
99
51
100
### Read-Only
52
101
53
102
-`id` (String) The ID of this resource.
54
103
104
+
<aid="nestedblock--policy"></a>
105
+
### Nested Schema for `policy`
106
+
107
+
Required:
108
+
109
+
-`contact_point` (String) The contact point to route notifications that match this rule to.
110
+
-`group_by` (List of String) A list of alert labels to group alerts into notifications by. Use the special label `...` to group alerts by all labels, effectively disabling grouping.
111
+
112
+
Optional:
113
+
114
+
-`continue` (Boolean) Whether to continue matching subsequent rules if an alert matches the current rule. Otherwise, the rule will be 'consumed' by the first policy to match it.
115
+
-`group_interval` (String) Minimum time interval between two notifications for the same group. Default is 5 minutes.
116
+
-`group_wait` (String) Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
117
+
-`matcher` (Block List) Describes which labels this rule should match. When multiple matchers are supplied, an alert must match ALL matchers to be accepted by this policy. When no matchers are supplied, the rule will match all alert instances. (see [below for nested schema](#nestedblock--policy--matcher))
118
+
-`mute_timings` (List of String) A list of mute timing names to apply to alerts that match this policy.
119
+
-`policy` (Block List) Routing rules for specific label sets. (see [below for nested schema](#nestedblock--policy--policy))
120
+
-`repeat_interval` (String) Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
121
+
122
+
<aid="nestedblock--policy--matcher"></a>
123
+
### Nested Schema for `policy.matcher`
124
+
125
+
Required:
126
+
127
+
-`label` (String) The name of the label to match against.
128
+
-`match` (String) The operator to apply when matching values of the given label. Allowed operators are `=` for equality, `!=` for negated equality, `=~` for regex equality, and `!~` for negated regex equality.
129
+
-`value` (String) The label value to match against.
130
+
131
+
132
+
<aid="nestedblock--policy--policy"></a>
133
+
### Nested Schema for `policy.policy`
134
+
135
+
Required:
136
+
137
+
-`contact_point` (String) The contact point to route notifications that match this rule to.
138
+
-`group_by` (List of String) A list of alert labels to group alerts into notifications by. Use the special label `...` to group alerts by all labels, effectively disabling grouping.
139
+
140
+
Optional:
141
+
142
+
-`continue` (Boolean) Whether to continue matching subsequent rules if an alert matches the current rule. Otherwise, the rule will be 'consumed' by the first policy to match it.
143
+
-`group_interval` (String) Minimum time interval between two notifications for the same group. Default is 5 minutes.
144
+
-`group_wait` (String) Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
145
+
-`matcher` (Block List) Describes which labels this rule should match. When multiple matchers are supplied, an alert must match ALL matchers to be accepted by this policy. When no matchers are supplied, the rule will match all alert instances. (see [below for nested schema](#nestedblock--policy--policy--matcher))
146
+
-`mute_timings` (List of String) A list of mute timing names to apply to alerts that match this policy.
147
+
-`policy` (Block List) Routing rules for specific label sets. (see [below for nested schema](#nestedblock--policy--policy--policy))
148
+
-`repeat_interval` (String) Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
149
+
150
+
<aid="nestedblock--policy--policy--matcher"></a>
151
+
### Nested Schema for `policy.policy.matcher`
152
+
153
+
Required:
154
+
155
+
-`label` (String) The name of the label to match against.
156
+
-`match` (String) The operator to apply when matching values of the given label. Allowed operators are `=` for equality, `!=` for negated equality, `=~` for regex equality, and `!~` for negated regex equality.
157
+
-`value` (String) The label value to match against.
158
+
159
+
160
+
<aid="nestedblock--policy--policy--policy"></a>
161
+
### Nested Schema for `policy.policy.policy`
162
+
163
+
Required:
164
+
165
+
-`contact_point` (String) The contact point to route notifications that match this rule to.
166
+
-`group_by` (List of String) A list of alert labels to group alerts into notifications by. Use the special label `...` to group alerts by all labels, effectively disabling grouping.
167
+
168
+
Optional:
169
+
170
+
-`continue` (Boolean) Whether to continue matching subsequent rules if an alert matches the current rule. Otherwise, the rule will be 'consumed' by the first policy to match it.
171
+
-`group_interval` (String) Minimum time interval between two notifications for the same group. Default is 5 minutes.
172
+
-`group_wait` (String) Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
173
+
-`matcher` (Block List) Describes which labels this rule should match. When multiple matchers are supplied, an alert must match ALL matchers to be accepted by this policy. When no matchers are supplied, the rule will match all alert instances. (see [below for nested schema](#nestedblock--policy--policy--policy--matcher))
174
+
-`mute_timings` (List of String) A list of mute timing names to apply to alerts that match this policy.
175
+
-`policy` (Block List) Routing rules for specific label sets. (see [below for nested schema](#nestedblock--policy--policy--policy--policy))
176
+
-`repeat_interval` (String) Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
### Nested Schema for `policy.policy.policy.matcher`
180
+
181
+
Required:
182
+
183
+
-`label` (String) The name of the label to match against.
184
+
-`match` (String) The operator to apply when matching values of the given label. Allowed operators are `=` for equality, `!=` for negated equality, `=~` for regex equality, and `!~` for negated regex equality.
185
+
-`value` (String) The label value to match against.
### Nested Schema for `policy.policy.policy.policy`
190
+
191
+
Required:
192
+
193
+
-`contact_point` (String) The contact point to route notifications that match this rule to.
194
+
-`group_by` (List of String) A list of alert labels to group alerts into notifications by. Use the special label `...` to group alerts by all labels, effectively disabling grouping.
195
+
196
+
Optional:
197
+
198
+
-`continue` (Boolean) Whether to continue matching subsequent rules if an alert matches the current rule. Otherwise, the rule will be 'consumed' by the first policy to match it.
199
+
-`group_interval` (String) Minimum time interval between two notifications for the same group. Default is 5 minutes.
200
+
-`group_wait` (String) Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
201
+
-`matcher` (Block List) Describes which labels this rule should match. When multiple matchers are supplied, an alert must match ALL matchers to be accepted by this policy. When no matchers are supplied, the rule will match all alert instances. (see [below for nested schema](#nestedblock--policy--policy--policy--policy--matcher))
202
+
-`mute_timings` (List of String) A list of mute timing names to apply to alerts that match this policy.
203
+
-`repeat_interval` (String) Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
### Nested Schema for `policy.policy.policy.policy.matcher`
207
+
208
+
Required:
209
+
210
+
-`label` (String) The name of the label to match against.
211
+
-`match` (String) The operator to apply when matching values of the given label. Allowed operators are `=` for equality, `!=` for negated equality, `=~` for regex equality, and `!~` for negated regex equality.
212
+
-`value` (String) The label value to match against.
0 commit comments