# Combine log using logstash

**URL:** <https://discuss.elastic.co/t/combine-log-using-logstash/136391>\
**Category:** Logstash\
**Created:** [June 18, 2018, 11:47pm UTC](https://discuss.elastic.co/t/combine-log-using-logstash/136391 "2018-06-18T23:47:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dqtho](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dqtho/32/32394_2.png) [@dqtho](https://discuss.elastic.co/u/dqtho)\
**Post date:** [June 18, 2018, 11:47pm UTC](https://discuss.elastic.co/t/combine-log-using-logstash/136391/1 "2018-06-18T23:47:19Z")

</div>

Hi all, I encounter with problem about zimbra mail log. When a user send email, zimbra create 2 log.  
First log with some field: email\_id, sender, receiver, subject....  
Second log with field: email\_id, status (ok if email sending successfully, otherwise it will be failed)

I wonder how can I using logstash to combine two log into one using field email\_id. Which only 1 log we can follow it easily than now.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [June 19, 2018, 2:13pm UTC](https://discuss.elastic.co/t/combine-log-using-logstash/136391/2 "2018-06-19T14:13:40Z")

</div>

Have you looked at the aggregate filter?

---

<div class="post-metadata">

**Author:** ![dqtho](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dqtho/32/32394_2.png) [@dqtho](https://discuss.elastic.co/u/dqtho)\
**Post date:** [June 19, 2018, 2:18pm UTC](https://discuss.elastic.co/t/combine-log-using-logstash/136391/3 "2018-06-19T14:18:53Z")

</div>

I had looked at the aggregate filter but I think aggregate filter is suitable for statistic. Do you have any exp using aggregate to solve my problem, bro?

---

<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:** [July 17, 2018, 2:19pm UTC](https://discuss.elastic.co/t/combine-log-using-logstash/136391/4 "2018-07-17T14:19:06Z")

</div>

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