Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prometheus Alert Manager: How do I prevent grouping in notifications

I'm trying to setup Alert Manager in a simple setup where it would send one Slack notification for each notification in receives.

I've hoped to disable grouping by removing the group_by configuration.

The problem is, that when I send 2 alert one after the other, even though the Alert Manager shows the 2 alerts as 'Not Grouped' when I get Slack notifications, I get one message for the first alert, and then a second message, where the 2 alerts are grouped.

Here is the config.yml

route:
  receiver: default-receiver
  group_wait: 1s #30s
  group_interval: 1s #5m
#  repeat_interval: 10m
#  group_by: [cluster, alertname]

receivers:
  - name: default-receiver
    slack_configs:
      - channel: "#alerts-test"

Any ideas?

like image 846
Yehuda Adler Avatar asked Mar 31 '20 11:03

Yehuda Adler


Video Answer


1 Answers

From the Prometheus documentation for configuration

You can use group_by: ['...'] in your Alert Manager as a solution.

However, this was introduced in v0.16. For More info, see this GitHub issue.

like image 62
shad0VV Avatar answered Dec 23 '22 23:12

shad0VV