# Multiline Pattern not breaking logs into multiple events\[Closed\]

**URL:** <https://discuss.elastic.co/t/multiline-pattern-not-breaking-logs-into-multiple-events-closed/171610>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [March 9, 2019, 8:13pm UTC](https://discuss.elastic.co/t/multiline-pattern-not-breaking-logs-into-multiple-events-closed/171610 "2019-03-09T20:13:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ankur\_singla](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankur_singla/32/45612_2.png) [@ankur\_singla](https://discuss.elastic.co/u/ankur_singla)\
**Post date:** [March 9, 2019, 8:13pm UTC](https://discuss.elastic.co/t/multiline-pattern-not-breaking-logs-into-multiple-events-closed/171610/1 "2019-03-09T20:13:56Z")

</div>

Hi Guys,

I am facing problem with multiline pattern in filebeat. My usecase for multiline for log data is very simple if log is not starting with date format(yyyy-mm-dd) then it should be considered as single event else if it is then new event, But it is indexing whole file as single doc in ES.

Sample log data-

```
2019-01-27 00:00:02,293 INFO Controller:718 - Received query for API: {"id":"1"}
2019-01-27 00:00:02,447 INFO Controller:154 - Received query for event: {"id":"1"}
2019-01-27 00:00:02,447 WARN Controller:160 - Error occurred in event:
common.WarningException: API not supported
        at com.services.Service.event(Service.java:128) ~[Service.class:?]
        at com.controller.Controller.event(Controller.java:157) [Controller.class:?]
        at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source) ~[?:?]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 

2019-01-27 00:00:02,447 INFO Controller:154 - Received query for event: {"id":"1"}
2019-01-27 00:00:02,447 INFO Controller:154 - Received query for event: {"id":"1"}

```

Multiline config-

```
  ## Multiline options
  multiline.pattern: '^\[0-9]{4}-[0-9]{2}-[0-9]{2}'
  multiline.negate: true
  multiline.match: after

```

From the above sample, I am expecting 5 different docs for logs in ES index. But whole file is indexing as a single doc in ES. Please help me out on this.

---

<div class="post-metadata">

**Author:** ![ankur\_singla](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankur_singla/32/45612_2.png) [@ankur\_singla](https://discuss.elastic.co/u/ankur_singla)\
**Post date:** [March 10, 2019, 8:44am UTC](https://discuss.elastic.co/t/multiline-pattern-not-breaking-logs-into-multiple-events-closed/171610/2 "2019-03-10T08:44:51Z")

</div>

It's working there was issue in my pattern.

multiline.pattern:  
**^[0-9]{4}-[0-9]{2}-[0-9]{2}**

---

<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 7, 2019, 8:54am UTC](https://discuss.elastic.co/t/multiline-pattern-not-breaking-logs-into-multiple-events-closed/171610/3 "2019-04-07T08:54:40Z")

</div>

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