I have the following two alerts:
alert: InstanceDown
expr: (up == 0) and (team == "foo")
for: 5m
labels:
severity: page
team: foo
annotations:
summary: "Instance {{$labels.instance}} down"
alert: InstanceDown
expr: (up == 0) and (team == "bar")
for: 5m
labels:
severity: page
team: bar
annotations:
summary: "Instance {{$labels.instance}} down"
How can I make Prometheus to send the first alert into one alertmanager exposed at alertmanager.example.com/team-foo
and second into another alertmanager exposed at alertmanager.example.com/team-bar
?
I figured I'll need to use service discovery and relabeling but couldn't get much further yet.
I'm using prometheus-operator if it matters.