Why does group_by in the child policy not work?

  • What Grafana version and what operating system are you using?
    Grafana v12.3.1 (3a1c80ca7c)

  • What are you trying to achieve?
    To have grouped alerts by message and service name and get just one email message by message label and one more message if service_name label is different too.

  • How are you trying to achieve it?
    I tried to delete service_name, but grouping by message doesn’t appeared.

  • What happened?
    I see in web interface child policies:


    But I get all messages by evaluation period in one message.

  • What you expected to see?
    Grouped separate messages. And also I voted for this topic, because I can’t edit policies from web interface and it is hard to debug problems like this.

  • Can you copy/paste the configuration(s) that you are having problems with?

    policies:
    - receiver: grafana-default-email
    group_by:
      - grafana_folder
      - alertname
    
    group_wait: 30s
    group_interval: 5m
    repeat_interval: 4h
    
    routes:
      - receiver: grafana-default-email
        object_matchers:
          - ["message", "=~", ".+"]
        group_by: ["service_name", "message"]
        mute_time_intervals:
          - no_night
    
  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    No

  • Did you follow any online instructions? If so, what is the URL?
    I see that routes syntax is the same as parent Use configuration files to provision alerting resources | Grafana documentation