-
Notifications
You must be signed in to change notification settings - Fork 494
Open
Description
I've tested this PR, and there is another logical error.
When the config of the Alertmanager got generated, since we don't use the Alertmanager CRD, we built it with the defaults:
alloy/internal/component/mimir/alerts/kubernetes/events.go
Lines 178 to 180 in 8c0090c
| // TODO: Add an option to get an Alertmanager CRD through k8s informers. | |
| cfgBuilder = alertmanager.NewConfigBuilder(slog.New(logging.NewSlogGoKitHandler(c.logger)), *version, store, &monitoringv1.Alertmanager{}) | |
| ) |
And it breaks the config, since it implicitly adds the
matchers:
- namespace="mimir"
to the main route:
...
routes:
- receiver: mimir/alertmanager-config/sre-alerts
group_by:
- alertname
- cluster
matchers:
- namespace="mimir" #<---- the issue, since we care only about the alerts from the mimir ns
continue: true
routes:
- receiver: mimir/alertmanager-config/other-alerts
matchers:
- cluster="staging"
- project="project1"
continue: false
repeat_interval: 12h
...
Because we don't use the Alertmanager CRD, where we can set the alertmanagerConfigMatcherStrategy.
Originally posted by @artemlive in #5010 (comment)
synthe102, bwnuts, qlimenoque, marushkaa, mykhailoponomarov and 2 more
Metadata
Metadata
Assignees
Labels
No labels