Skip to content

Commit 65c6106

Browse files
authored
fix(observability): remove invalid fields match and match_regex from main route in alert_config (#915)
* fix: remove invalid `match` and `match_regex` from main route in alert_config - deprecated `match` and `match_regex` in child routes - add new `matchers` field
1 parent 433efa0 commit 65c6106

File tree

9 files changed

+157
-111
lines changed

9 files changed

+157
-111
lines changed

docs/data-sources/observability_instance.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,6 @@ Read-Only:
133133
- `group_by` (List of String) The labels by which incoming alerts are grouped together. For example, multiple alerts coming in for cluster=A and alertname=LatencyHigh would be batched into a single group. To aggregate by all possible labels use the special value '...' as the sole label name, for example: group_by: ['...']. This effectively disables aggregation entirely, passing through all alerts as-is. This is unlikely to be what you want, unless you have a very low alert volume or your upstream notification system performs its own grouping.
134134
- `group_interval` (String) How long to wait before sending a notification about new alerts that are added to a group of alerts for which an initial notification has already been sent. (Usually ~5m or more.)
135135
- `group_wait` (String) How long to initially wait to send a notification for a group of alerts. Allows to wait for an inhibiting alert to arrive or collect more initial alerts for the same group. (Usually ~0s to few minutes.) .
136-
- `match` (Map of String) A set of equality matchers an alert has to fulfill to match the node.
137-
- `match_regex` (Map of String) A set of regex-matchers an alert has to fulfill to match the node.
138136
- `receiver` (String) The name of the receiver to route the alerts to.
139137
- `repeat_interval` (String) How long to wait before sending a notification again if it has already been sent successfully for an alert. (Usually ~3h or more).
140138
- `routes` (Attributes List) List of child routes. (see [below for nested schema](#nestedatt--alert_config--route--routes))
@@ -147,7 +145,8 @@ Read-Only:
147145
- `group_by` (List of String) The labels by which incoming alerts are grouped together. For example, multiple alerts coming in for cluster=A and alertname=LatencyHigh would be batched into a single group. To aggregate by all possible labels use the special value '...' as the sole label name, for example: group_by: ['...']. This effectively disables aggregation entirely, passing through all alerts as-is. This is unlikely to be what you want, unless you have a very low alert volume or your upstream notification system performs its own grouping.
148146
- `group_interval` (String) How long to wait before sending a notification about new alerts that are added to a group of alerts for which an initial notification has already been sent. (Usually ~5m or more.)
149147
- `group_wait` (String) How long to initially wait to send a notification for a group of alerts. Allows to wait for an inhibiting alert to arrive or collect more initial alerts for the same group. (Usually ~0s to few minutes.)
150-
- `match` (Map of String) A set of equality matchers an alert has to fulfill to match the node.
151-
- `match_regex` (Map of String) A set of regex-matchers an alert has to fulfill to match the node.
148+
- `match` (Map of String, Deprecated) A set of equality matchers an alert has to fulfill to match the node. This field is deprecated and will be removed after 10th March 2026, use `matchers` in the `routes` instead
149+
- `match_regex` (Map of String, Deprecated) A set of regex-matchers an alert has to fulfill to match the node. This field is deprecated and will be removed after 10th March 2026, use `matchers` in the `routes` instead
150+
- `matchers` (List of String) A list of matchers that an alert has to fulfill to match the node. A matcher is a string with a syntax inspired by PromQL and OpenMetrics.
152151
- `receiver` (String) The name of the receiver to route the alerts to.
153152
- `repeat_interval` (String) How long to wait before sending a notification again if it has already been sent successfully for an alert. (Usually ~3h or more).

docs/resources/observability_instance.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,6 @@ Optional:
142142
- `group_by` (List of String) The labels by which incoming alerts are grouped together. For example, multiple alerts coming in for cluster=A and alertname=LatencyHigh would be batched into a single group. To aggregate by all possible labels use the special value '...' as the sole label name, for example: group_by: ['...']. This effectively disables aggregation entirely, passing through all alerts as-is. This is unlikely to be what you want, unless you have a very low alert volume or your upstream notification system performs its own grouping.
143143
- `group_interval` (String) How long to wait before sending a notification about new alerts that are added to a group of alerts for which an initial notification has already been sent. (Usually ~5m or more.)
144144
- `group_wait` (String) How long to initially wait to send a notification for a group of alerts. Allows to wait for an inhibiting alert to arrive or collect more initial alerts for the same group. (Usually ~0s to few minutes.)
145-
- `match` (Map of String) A set of equality matchers an alert has to fulfill to match the node.
146-
- `match_regex` (Map of String) A set of regex-matchers an alert has to fulfill to match the node.
147145
- `repeat_interval` (String) How long to wait before sending a notification again if it has already been sent successfully for an alert. (Usually ~3h or more).
148146
- `routes` (Attributes List) List of child routes. (see [below for nested schema](#nestedatt--alert_config--route--routes))
149147

@@ -159,8 +157,9 @@ Optional:
159157
- `group_by` (List of String) The labels by which incoming alerts are grouped together. For example, multiple alerts coming in for cluster=A and alertname=LatencyHigh would be batched into a single group. To aggregate by all possible labels use the special value '...' as the sole label name, for example: group_by: ['...']. This effectively disables aggregation entirely, passing through all alerts as-is. This is unlikely to be what you want, unless you have a very low alert volume or your upstream notification system performs its own grouping.
160158
- `group_interval` (String) How long to wait before sending a notification about new alerts that are added to a group of alerts for which an initial notification has already been sent. (Usually ~5m or more.)
161159
- `group_wait` (String) How long to initially wait to send a notification for a group of alerts. Allows to wait for an inhibiting alert to arrive or collect more initial alerts for the same group. (Usually ~0s to few minutes.)
162-
- `match` (Map of String) A set of equality matchers an alert has to fulfill to match the node.
163-
- `match_regex` (Map of String) A set of regex-matchers an alert has to fulfill to match the node.
160+
- `match` (Map of String, Deprecated) A set of equality matchers an alert has to fulfill to match the node. This field is deprecated and will be removed after 10th March 2026, use `matchers` in the `routes` instead
161+
- `match_regex` (Map of String, Deprecated) A set of regex-matchers an alert has to fulfill to match the node. This field is deprecated and will be removed after 10th March 2026, use `matchers` in the `routes` instead
162+
- `matchers` (List of String) A list of matchers that an alert has to fulfill to match the node. A matcher is a string with a syntax inspired by PromQL and OpenMetrics.
164163
- `repeat_interval` (String) How long to wait before sending a notification again if it has already been sent successfully for an alert. (Usually ~3h or more).
165164

166165

stackit/internal/services/observability/instance/datasource.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -296,16 +296,6 @@ func (d *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaReques
296296
Description: "How long to initially wait to send a notification for a group of alerts. Allows to wait for an inhibiting alert to arrive or collect more initial alerts for the same group. (Usually ~0s to few minutes.) .",
297297
Computed: true,
298298
},
299-
"match": schema.MapAttribute{
300-
Description: "A set of equality matchers an alert has to fulfill to match the node.",
301-
Computed: true,
302-
ElementType: types.StringType,
303-
},
304-
"match_regex": schema.MapAttribute{
305-
Description: "A set of regex-matchers an alert has to fulfill to match the node.",
306-
Computed: true,
307-
ElementType: types.StringType,
308-
},
309299
"receiver": schema.StringAttribute{
310300
Description: "The name of the receiver to route the alerts to.",
311301
Computed: true,

0 commit comments

Comments
 (0)