Hey, Björn! 0/

I'll try to describe the issue.

I have a bunch of K8s clusters that sends alerts to my Alertmanager. Every 
cluster has its own Prometheus in it. Infrastructure guys sharing these 
Prometheuses between devs and send alerts to two Alertmanager 
simultaneously (weird, I know, but there is no chance to set up devs their 
own Prometheus instance in a cluster).

The thing is that I want to separate devs alerts from infrastructure ones 
and send infrastructure alerts to "/dev/null/" while devs alerts should be 
routed to a certain receiver.

For this case, all the devs alert marked with a special label: 
team_name="team1|team2|teamN".

Devs teams count will grow without any control, so I can't define the 
static regexp rules for `match_re`.

And here's the main issue - I can't set a regexp rule for `match_re` like 
`team_name: '.*'`. It's just doesn't work.

Here's my Alertmanager config:

global:
  ...
route:
  group_by:
  - '...'
  group_wait: 30s
  group_interval: 5m
  repeat_interval: 12h
  receiver: blackhole
  routes:
  - match_re:
      team_name: '.*'
    receiver: pageduty
receivers:
- name: blackhole
- name: pageduty
  ...

Thanks in advance!
On Thursday, January 7, 2021 at 6:57:02 PM UTC+3 [email protected] wrote:

> On 30.12.20 07:30, Anton Tokarev wrote:
> > 
> > I've tried to use regex 'my_label: .+' but seems it doesn't work.
> > 
> > ```
> > ...
> > route:
> > group_by:
> > - '...'
> > group_wait: 30s
> > group_interval: 5m
> > repeat_interval: 12h
> > receiver: 'blackhole'
> > routes:
> > - match_re:
> > opsgenie_team_id: '.+'
> > receiver: 'opsgenie'
> > receivers:
> > - name: 'blackhole'
> > - name: 'opsgenie'
> > ...
> > ```
> > 
> > Could you guys please help?
>
> At first glance, I'd say it should work.
>
> Could you describe more precisely what you are seeing? Like show us
> ladies an example alert that goes down a route that you didn't expect?
>
> -- 
> Björn Rabenstein
> [PGP-ID] 0x851C3DA17D748D03
> [email] [email protected]
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/bbac98d4-b693-41ce-8f6d-59b570e34a51n%40googlegroups.com.

Reply via email to