Notification Policy with custom group by option not working

  • I’m using grafana oss 12.1.1 on a ubuntu 22.04 server.

  • I wanted to group the notification by a custom label “template_uid“, and send a summary message instead of sending a message for each alert.

  • I changed the default notification policy to group by “template_uid“.

there are 2 different template_uid in my rules, and I viewed in active notification page, the grouping is correct.

By asking grot ai, I was informed that rules without label “template_uid“ will not make notification policy fallback to group by alert name and grafana folder.

I’m using a custom payload to send a custom message to webhook point in Feishu, which should traverse a group and send only one message for the whole group. However, it is not working and still sending 9 messages for my only 2 groups.

I clicked the entities statistic area under the default policy, and it shows a router window, which I guess is a display of how current alerting entities is grouped by, and it is still using grafana folder and alert name.

I have searched google, asked grot ai and gemini, and read some of the docs, but really no help.

May anyone knows why is this happening and how to do it properly, thanks a lot!

Welcome to the community forum @cedriczhao :waving_hand:

Can you edit your notification policies and ensure you are overriding grouping ? I believe you also will need to remove any of the existing labels (grafana_folder, alertname) and add your custom label.

Here’s a tutorial on using alert grouping. Hope it helps!