# How to aggregate two events from log lines with no common pattern

**URL:** <https://discuss.elastic.co/t/how-to-aggregate-two-events-from-log-lines-with-no-common-pattern/167939>\
**Category:** Logstash\
**Created:** [February 11, 2019, 10:27pm UTC](https://discuss.elastic.co/t/how-to-aggregate-two-events-from-log-lines-with-no-common-pattern/167939 "2019-02-11T22:27:38Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [February 11, 2019, 10:43pm UTC](https://discuss.elastic.co/t/how-to-aggregate-two-events-from-log-lines-with-no-common-pattern/167939/2 "2019-02-11T22:43:15Z")

</div>

If your log always has pairs of those two lines you could do something like [this](https://discuss.elastic.co/t/copy-last-uuid-value-in-the-configuration/166825/4?u=badger).

You would need to grok the fields you want and for the hostname stash that in a class variable in the first ruby filter.

---

_[View the full topic](https://discuss.elastic.co/t/how-to-aggregate-two-events-from-log-lines-with-no-common-pattern/167939)._
