How to set the maximum number of alertmanager group_by

49 views
Skip to first unread message

long

unread,
Jul 16, 2020, 11:26:46 PM7/16/20
to Prometheus Users
When I set up group_by in alertmanager.yml, I have an alert manager with 25 alerts, but it will be split into 3 messages each with a maximum of 10 alerts. How do I set the maximum number of alerts in 1 message?


my alertmanager.yml :
route:
  group_by: ['alertname']
  group_wait: 1m
  group_interval: 5m
  repeat_interval: 1h
  receiver: 'msteams'  
  routes:
    - receiver: msteams
      match_re:
        severity: .*

Christian Hoffmann

unread,
Jul 18, 2020, 12:37:27 PM7/18/20
to long, Prometheus Users
Hi,

On 7/17/20 5:26 AM, long wrote:
> When I set up group_by in alertmanager.yml, I have an alert manager with
> 25 alerts, but it will be split into 3 messages each with a maximum of
> 10 alerts. How do I set the maximum number of alerts in 1 message?

I haven't heard of an alertmanager-side limitation. Could it be that
this is done on your msteams integration side?

Kind regards,
Christian

Julien Pivotto

unread,
Jul 18, 2020, 12:46:18 PM7/18/20
to Christian Hoffmann, long, Prometheus Users
What you can do is set a max_alerts:

The maximum number of alerts to include in a single webhook message.
Alerts above this threshold are truncated.
https://prometheus.io/docs/alerting/latest/configuration/#webhook_config

But then the other alerts won't be sent, they will be dropped of the
webhook.


>
> Kind regards,
> Christian
>
> --
> 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 prometheus-use...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/85338988-3d21-fb79-4c8c-d1e210b357b6%40hoffmann-christian.info.

--
Julien Pivotto
@roidelapluie
Reply all
Reply to author
Forward
0 new messages