prometheus / prometheus/alertmanager
How about change the route.routes.receiver to list?
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 8.6k
- Forks
- 2.5k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 61
Description
What did you do?
What did you expect to see?
What did you see instead? Under which circumstances?
Environment
-
System information:
insert output of
uname -srmhere -
Alertmanager version:
insert output of
alertmanager --versionhere (repeat for each alertmanager
version in your cluster, if relevant to the issue) -
Prometheus version:
insert output of
prometheus --versionhere (repeat for each prometheus
version in your cluster, if relevant to the issue) -
Alertmanager configuration file:
insert configuration here
- Prometheus configuration file:
insert configuration here (if relevant to the issue)
- Logs:
insert Prometheus and Alertmanager logs relevant to the issue here
As-Is, we could route the alerts with their labels.
To do so, we set route.routes like below
route:
routes:
- receiver: dev-receiver
matchers:
- test="true"
continue: false
repeat_interval: 6h
- receiver: default-receiver
matchers:
- test="false"
continue: false
repeat_interval: 6h
- receiver: another-receiver
matchers:
- test="true"
continue: false
repeat_interval: 6h
If alerts are fired, then the alertmanager would check the label "test" to route those alerts.
If the label "test" has value "true", then "dev-receiver" would receive the alert from the alertmanager, but "another-receiver" will get no alert.
Alerts could be sent to multiple receivers, like if some nodes are down then the infra, platform and developer team should get alerts.
In this case, the receiver would proxy the alert from the alertmanager to another receiver "infra, platform and dev", which is adding one more hop in the alert system.
If alertmanager could send the alerts to several receivers, then we could make the alert system fit.
So finally, the alertmanager.yaml would be
route:
routes:
- receiver:
- dev-receiver
- another-receiver
matchers:
- test="true"
continue: false
repeat_interval: 6h
- receiver:
- default-receiver
matchers:
- test="false"
continue: false
repeat_interval: 6h
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue does not name files or tests. Start by tracing how Alertmanager parses route.routes and selects a receiver, then determine how multiple receivers should be delivered for one matching route. Done means a route can specify several receivers and alerts reach each of them without an extra proxy hop.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100