Skip to content

Commit 45f2347

Browse files
committed
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 54b483d commit 45f2347

File tree

5 files changed

+167
-80
lines changed

5 files changed

+167
-80
lines changed

docs/data-sources/observability_instance.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,6 @@ Read-Only:
131131
- `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.
132132
- `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.)
133133
- `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.) .
134-
- `match` (Map of String) A set of equality matchers an alert has to fulfill to match the node.
135-
- `match_regex` (Map of String) A set of regex-matchers an alert has to fulfill to match the node.
136134
- `receiver` (String) The name of the receiver to route the alerts to.
137135
- `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).
138136
- `routes` (Attributes List) List of child routes. (see [below for nested schema](#nestedatt--alert_config--route--routes))
@@ -145,7 +143,8 @@ Read-Only:
145143
- `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.
146144
- `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.)
147145
- `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.)
148-
- `match` (Map of String) A set of equality matchers an alert has to fulfill to match the node.
149-
- `match_regex` (Map of String) A set of regex-matchers an alert has to fulfill to match the node.
146+
- `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 16th January 2026, use `matchers` in the `routes` instead
147+
- `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 16th January 2026, use `matchers` in the `routes` instead
148+
- `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.
150149
- `receiver` (String) The name of the receiver to route the alerts to.
151150
- `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
@@ -134,8 +134,6 @@ Optional:
134134
- `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.
135135
- `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.)
136136
- `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.)
137-
- `match` (Map of String) A set of equality matchers an alert has to fulfill to match the node.
138-
- `match_regex` (Map of String) A set of regex-matchers an alert has to fulfill to match the node.
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))
141139

@@ -151,8 +149,9 @@ Optional:
151149
- `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.
152150
- `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.)
153151
- `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.)
154-
- `match` (Map of String) A set of equality matchers an alert has to fulfill to match the node.
155-
- `match_regex` (Map of String) A set of regex-matchers an alert has to fulfill to match the node.
152+
- `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 16th January 2026, use `matchers` in the `routes` instead
153+
- `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 16th January 2026, use `matchers` in the `routes` instead
154+
- `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.
156155
- `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).
157156

158157

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -286,16 +286,6 @@ func (d *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaReques
286286
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.) .",
287287
Computed: true,
288288
},
289-
"match": schema.MapAttribute{
290-
Description: "A set of equality matchers an alert has to fulfill to match the node.",
291-
Computed: true,
292-
ElementType: types.StringType,
293-
},
294-
"match_regex": schema.MapAttribute{
295-
Description: "A set of regex-matchers an alert has to fulfill to match the node.",
296-
Computed: true,
297-
ElementType: types.StringType,
298-
},
299289
"receiver": schema.StringAttribute{
300290
Description: "The name of the receiver to route the alerts to.",
301291
Computed: true,

0 commit comments

Comments
 (0)