# Grok filter multiple match

**URL:** <https://discuss.elastic.co/t/grok-filter-multiple-match/252016>\
**Category:** Kibana\
**Created:** [October 14, 2020, 9:19am UTC](https://discuss.elastic.co/t/grok-filter-multiple-match/252016 "2020-10-14T09:19:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![inhinyera16](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/inhinyera16/32/61625_2.png) [@inhinyera16](https://discuss.elastic.co/u/inhinyera16)\
**Post date:** [October 14, 2020, 9:19am UTC](https://discuss.elastic.co/t/grok-filter-multiple-match/252016/1 "2020-10-14T09:19:05Z")

</div>

Hi

I have these lines in my log

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/b/5b747ff9489fc9ddc47d75211983924fea32cfc7.png)

how do i make an array of rootcause using grok?

Something like this

rootcause=\> {  
text1,  
text2  
}

TIA.

---

<div class="post-metadata">

**Author:** ![matw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matw/32/13913_2.png) [@matw](https://discuss.elastic.co/u/matw)\
**Post date:** [October 16, 2020, 8:32am UTC](https://discuss.elastic.co/t/grok-filter-multiple-match/252016/2 "2020-10-16T08:32:40Z")

</div>

Hi  
Since this is the #elastic-stack:kibana channel, you might get a better answer in the #elastic-stack:logstash channel. I don't think you can achieve this with grok (unless you know what's the max number of root causes) . But I would try combining the grok and the [ruby filter](https://www.elastic.co/guide/en/logstash/current/plugins-filters-ruby.html) plugin, there it should be easy to split the message and create an array.

You might also find the Split filter useful for this: [https://www.elastic.co/guide/en/logstash/current/plugins-filters-split.html](https://www.elastic.co/guide/en/logstash/current/plugins-filters-split.html)

Best,  
Matthias

---

<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:** [November 13, 2020, 8:32am UTC](https://discuss.elastic.co/t/grok-filter-multiple-match/252016/3 "2020-11-13T08:32:54Z")

</div>

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