# Filtering of unusual multiline json

**URL:** <https://discuss.elastic.co/t/filtering-of-unusual-multiline-json/89022>\
**Category:** Logstash\
**Created:** [June 12, 2017, 11:06am UTC](https://discuss.elastic.co/t/filtering-of-unusual-multiline-json/89022 "2017-06-12T11:06:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aleksandr\_Matveyev](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@Aleksandr\_Matveyev](https://discuss.elastic.co/u/Aleksandr_Matveyev)\
**Post date:** [June 12, 2017, 11:06am UTC](https://discuss.elastic.co/t/filtering-of-unusual-multiline-json/89022/1 "2017-06-12T11:06:51Z")

</div>

Hi, everyone. I have unusual log with json  
`INFO | jvm 1 | main | 2017/06/11 10:29:22.699 | Matched response definition: INFO | jvm 1 | main | 2017/06/11 10:29:22.699 | { INFO | jvm 1 | main | 2017/06/11 10:29:22.699 | "status" : 200, INFO | jvm 1 | main | 2017/06/11 10:29:22.699 | "body" : "{\"tariffSpecId\":\"Tservserv\",\"hasSplitBill\":\"true\",\"services\":[{\"serviceSpecId\":\"Tservadd\"},{\"serviceSpecId\":\"SERVICE_ROAMING\"},{\"serviceSpecId\":\"SERVICE_ROAMING_BUSINESS\"}]}", INFO | jvm 1 | main | 2017/06/11 10:29:22.699 | "headers" : { INFO | jvm 1 | main | 2017/06/11 10:29:22.699 | "Content-Type" : "application/json", INFO | jvm 1 | main | 2017/06/11 10:29:22.699 | "Connection" : "close" INFO | jvm 1 | main | 2017/06/11 10:29:22.699 | } INFO | jvm 1 | main | 2017/06/11 10:29:22.699 | }`  
But as you see, I have another messages on each line (log level, module, timestamp). Could you suggest me any approach about how can I do it? I think that:  
I must remove any entries of `INFO | jvm 1 | main | 2017/06/11 10:29:22.699 |` and attach only messages through `multiline` filter-plugin. BUT! How can I choose these specific messages, without breaking of whole log with other records.  
Can I multiline message between two patterns? I mean between `(\s|\t)+{$` and `(\s|\t)+}$`?

---

<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 10, 2017, 11:06am UTC](https://discuss.elastic.co/t/filtering-of-unusual-multiline-json/89022/2 "2017-07-10T11:06:59Z")

</div>

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