# Grouping (aggregation) does not work when using visual graph

**URL:** <https://forum.opensearch.org/t/grouping-aggregation-does-not-work-when-using-visual-graph/1104>\
**Category:** Alerting\
**Created:** [July 10, 2019, 2:27pm UTC](https://forum.opensearch.org/t/grouping-aggregation-does-not-work-when-using-visual-graph/1104 "2019-07-10T14:27:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kklemen](https://avatars.discourse-cdn.com/v4/letter/k/f0a364/32.png) [@kklemen](https://forum.opensearch.org/u/kklemen)\
**Post date:** [July 10, 2019, 2:27pm UTC](https://forum.opensearch.org/t/grouping-aggregation-does-not-work-when-using-visual-graph/1104/1 "2019-07-10T14:27:24Z")

</div>

When creating an alert in kibana with “define using visual graph” the field “OVER ALL DOCUMENTS” should support aggregation but it currently does not. It always shows “over all documents” regardless of what settings are configured in other fields.

screenshot: [https://i.imgur.com/4Iwf2zy.png](https://i.imgur.com/4Iwf2zy.png)

This is a very basic and highly used feature in other alerting tools (x-pack or elastalert) which allows use cases such as grouping on beat.name so one alert can cover multiple hosts. Right now separating alerts by host can only be implemented with “define using extraction query” (removes simplicity) or by implementing one alert for each host (creates a mess).

Using elasticsearch 7.1.1 with kibana 7.1.1 on linux  
kibana-alerting 1.1.0.0 and kibana-alerting-elasticsearch 1.1.0.0 built from github then installed into elasticsearch as a plugin.

Also reported on github: [grouping in kibana does not work · Issue #68 · opendistro-for-elasticsearch/alerting-kibana-plugin · GitHub](https://github.com/opendistro-for-elasticsearch/alerting-kibana-plugin/issues/68)

---

<div class="post-metadata">

**Author:** ![dbbaughe](https://avatars.discourse-cdn.com/v4/letter/d/bbe5ce/32.png) [@dbbaughe](https://forum.opensearch.org/u/dbbaughe)\
**Post date:** [July 10, 2019, 5:04pm UTC](https://forum.opensearch.org/t/grouping-aggregation-does-not-work-when-using-visual-graph/1104/2 "2019-07-10T17:04:21Z")

</div>

Hi @kklemen,

We only support “OVER ALL DOCUMENTS” as of right now for that OVER field. We originally were looking into adding aggregation support, but were not completely happy with the current solutions and wanted to look into that feature more.

Thanks for the request, feel free to track the issue on GitHub.

Thanks,  
Drew

---

<div class="post-metadata">

**Author:** ![skkosuri-amzn](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/skkosuri-amzn/32/935_2.png) [@skkosuri-amzn](https://forum.opensearch.org/u/skkosuri-amzn)\
**Post date:** [November 28, 2020, 10:15pm UTC](https://forum.opensearch.org/t/grouping-aggregation-does-not-work-when-using-visual-graph/1104/3 "2020-11-28T22:15:53Z")

</div>

Closed on November 28, 2020, 10:15pm UTC


