# GROK FILTER NOT WORKING WITH MULTILINE UNSTRUCTURED MESSAGE

**URL:** <https://discuss.elastic.co/t/grok-filter-not-working-with-multiline-unstructured-message/172386>\
**Category:** Logstash\
**Created:** [March 14, 2019, 4:26pm UTC](https://discuss.elastic.co/t/grok-filter-not-working-with-multiline-unstructured-message/172386 "2019-03-14T16:26:10Z")\
**Posts on this page:** 5\
**Page:** 2

<div class="post-metadata">

**Author:** ![kharvey](https://avatars.discourse-cdn.com/v4/letter/k/d07c76/32.png) [@kharvey](https://discuss.elastic.co/u/kharvey)\
**Post date:** [March 15, 2019, 5:31pm UTC](https://discuss.elastic.co/t/grok-filter-not-working-with-multiline-unstructured-message/172386/21 "2019-03-15T17:31:44Z")

</div>

Yup, you have your tabs messed up.  
Delete exactly one space in front of the three multiline. lines.  
Then try again.

Your current filebeat.yml is adding your multiline.\* as fields because you have one extra space in front of each of those lines.

---

<div class="post-metadata">

**Author:** ![Sharma3007](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sharma3007/32/43414_2.png) [@Sharma3007](https://discuss.elastic.co/u/Sharma3007)\
**Post date:** [March 15, 2019, 5:45pm UTC](https://discuss.elastic.co/t/grok-filter-not-working-with-multiline-unstructured-message/172386/22 "2019-03-15T17:45:09Z")

</div>

removed one space but still the same issue.

Can you please paste your corrected filebeat.yaml file?  
may be something is missing from my end.

after this change I am getting only last line in the message field.

---

<div class="post-metadata">

**Author:** ![Sharma3007](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sharma3007/32/43414_2.png) [@Sharma3007](https://discuss.elastic.co/u/Sharma3007)\
**Post date:** [March 15, 2019, 6:06pm UTC](https://discuss.elastic.co/t/grok-filter-not-working-with-multiline-unstructured-message/172386/23 "2019-03-15T18:06:09Z")

</div>

Thanks a lot Ken.

Now I am getting the whole message in one single message field.

---

<div class="post-metadata">

**Author:** ![kharvey](https://avatars.discourse-cdn.com/v4/letter/k/d07c76/32.png) [@kharvey](https://discuss.elastic.co/u/kharvey)\
**Post date:** [March 15, 2019, 6:09pm UTC](https://discuss.elastic.co/t/grok-filter-not-working-with-multiline-unstructured-message/172386/24 "2019-03-15T18:09:39Z")

</div>

Now you should be able to start to grok that one line to break it out how you want to see it in Elastic Search.

---

<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:** [April 12, 2019, 6:09pm UTC](https://discuss.elastic.co/t/grok-filter-not-working-with-multiline-unstructured-message/172386/25 "2019-04-12T18:09:39Z")

</div>

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

[Previous page](https://discuss.elastic.co/t/grok-filter-not-working-with-multiline-unstructured-message/172386.md?page=1)
