# How can i send all the events in one email using logstash

**URL:** https://discuss.elastic.co/t/how-can-i-send-all-the-events-in-one-email-using-logstash/159087
**Category:** Logstash
**Created:** [December 3, 2018, 4:50am UTC](https://discuss.elastic.co/t/how-can-i-send-all-the-events-in-one-email-using-logstash/159087 "2018-12-03T04:50:43Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![naga\_kunchala](https://avatars.discourse-cdn.com/v4/letter/n/d9b06d/32.png) [@naga\_kunchala](https://discuss.elastic.co/u/naga_kunchala)
#### Post date: [December 3, 2018, 4:50am UTC](https://discuss.elastic.co/t/how-can-i-send-all-the-events-in-one-email-using-logstash/159087/1 "2018-12-03T04:50:43Z")

</div>

how can i send all the events in one email using logstash

---

<div class="post-metadata">

### Author: ![AquaX](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aquax/32/92006_2.png) [@AquaX](https://discuss.elastic.co/u/AquaX)
#### Post date: [December 5, 2018, 3:28am UTC](https://discuss.elastic.co/t/how-can-i-send-all-the-events-in-one-email-using-logstash/159087/2 "2018-12-05T03:28:39Z")

</div>

Use the aggregate filter to combine multiple events together.  
[https://www.elastic.co/guide/en/logstash/current/plugins-filters-aggregate.html](https://www.elastic.co/guide/en/logstash/current/plugins-filters-aggregate.html)

---

<div class="post-metadata">

### Author: ![naga\_kunchala](https://avatars.discourse-cdn.com/v4/letter/n/d9b06d/32.png) [@naga\_kunchala](https://discuss.elastic.co/u/naga_kunchala)
#### Post date: [December 5, 2018, 6:50am UTC](https://discuss.elastic.co/t/how-can-i-send-all-the-events-in-one-email-using-logstash/159087/3 "2018-12-05T06:50:37Z")

</div>

Thanks for your valuable information. can you please send me one example using aggregate filter send mail at least 10 events at time

---

<div class="post-metadata">

### Author: ![AquaX](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aquax/32/92006_2.png) [@AquaX](https://discuss.elastic.co/u/AquaX)
#### Post date: [December 6, 2018, 2:13pm UTC](https://discuss.elastic.co/t/how-can-i-send-all-the-events-in-one-email-using-logstash/159087/4 "2018-12-06T14:13:08Z")

</div>

There are plenty of examples in the documentation and it would depend on what your configuration is.  
Essentially you would have to figure out how you would measure the first 10 tasks.... maybe by mapping a counter using the aggregate filter and then increasing that counter for each log line and once it hits 10 then mark your task as the end and then run the output to mail.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [January 3, 2019, 2:13pm UTC](https://discuss.elastic.co/t/how-can-i-send-all-the-events-in-one-email-using-logstash/159087/5 "2019-01-03T14:13:14Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
