# Multiline is not working when i am sending logs to logstash through filebeat?

**URL:** https://discuss.elastic.co/t/multiline-is-not-working-when-i-am-sending-logs-to-logstash-through-filebeat/88170
**Category:** Beats
**Tags:** filebeat
**Created:** [June 4, 2017, 6:12am UTC](https://discuss.elastic.co/t/multiline-is-not-working-when-i-am-sending-logs-to-logstash-through-filebeat/88170 "2017-06-04T06:12:39Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Yaswanth](https://avatars.discourse-cdn.com/v4/letter/y/94ad74/32.png) [@Yaswanth](https://discuss.elastic.co/u/Yaswanth)
#### Post date: [June 4, 2017, 6:12am UTC](https://discuss.elastic.co/t/multiline-is-not-working-when-i-am-sending-logs-to-logstash-through-filebeat/88170/1 "2017-06-04T06:12:39Z")

</div>

Hi,

Logs:

```
[2017-05-25 01:00:00,647][ERROR][marvel.agent.exporter.local] local exporter [default_local] - ...
[2017-05-18 00:00:06,339][DEBUG][action.admin.indices.create] [data-2] [data-may-2017,data-apr-..

```

When i am sending logs from filebeat to logstash through multiline codec in the filebeat configuration it is not working .

My filebeat config:

```
- input_type: log

  # Paths that should be crawled and fetched. Glob based paths.
  paths:
    - F:\elasticsearch-2.4.0\elasticsearch-2.4.0\logs\elasticsearch_index_search_slowlog.log
    #- c:\programdata\elasticsearch\logs\*
 
  multiline.pattern: ^\[%{TIMESTAMP_ISO8601:TIMESTAMP}\]
  multiline.negate: true
  multiline.match: "after"

output.logstash:
  # The Logstash hosts
  hosts: ["localhost:5044"]

logging:
  to_files: true
  files:
    path: C:\Program Files\filebeat\logs
  level: debug
  selectors: ["*"]

```

Output: My both logs are merged together and coming

Logstash: When i used the same multiline in logstash it is working fine . I can see my logs are separated.

Whether the problem is in my filebeat configuration?

Thanks

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [June 4, 2017, 8:43am UTC](https://discuss.elastic.co/t/multiline-is-not-working-when-i-am-sending-logs-to-logstash-through-filebeat/88170/2 "2017-06-04T08:43:16Z")

</div>

You seem to be using grok syntax in the Filebeat config, which I suspect is why it is not working. Have a look at [the example in the documentation](https://www.elastic.co/guide/en/beats/filebeat/current/multiline-examples.html#_timestamps) to see what it should look like. Change this and remove the multiline codec from the beats input and see if that helps.

---

<div class="post-metadata">

### Author: ![Yaswanth](https://avatars.discourse-cdn.com/v4/letter/y/94ad74/32.png) [@Yaswanth](https://discuss.elastic.co/u/Yaswanth)
#### Post date: [June 4, 2017, 8:50am UTC](https://discuss.elastic.co/t/multiline-is-not-working-when-i-am-sending-logs-to-logstash-through-filebeat/88170/3 "2017-06-04T08:50:59Z")

</div>

Thanks..

But when i used below pattern it is working fine in logstash.[quote="Yaswanth, post:1, topic:88170"]  
^[%{TIMESTAMP\_ISO8601:TIMESTAMP}]  
[/quote]

Did it differ that much in Filebeat?

Thanks

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [June 4, 2017, 9:07am UTC](https://discuss.elastic.co/t/multiline-is-not-working-when-i-am-sending-logs-to-logstash-through-filebeat/88170/4 "2017-06-04T09:07:12Z")

</div>

As far as I know Filebeat does not support grok syntax, so patterns will need to be different as outlined in the documentation.

---

<div class="post-metadata">

### Author: ![Yaswanth](https://avatars.discourse-cdn.com/v4/letter/y/94ad74/32.png) [@Yaswanth](https://discuss.elastic.co/u/Yaswanth)
#### Post date: [June 4, 2017, 9:09am UTC](https://discuss.elastic.co/t/multiline-is-not-working-when-i-am-sending-logs-to-logstash-through-filebeat/88170/5 "2017-06-04T09:09:42Z")

</div>

Ohh..Thanks @Christian_Dahlqvist

---

<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 2, 2017, 9:10am UTC](https://discuss.elastic.co/t/multiline-is-not-working-when-i-am-sending-logs-to-logstash-through-filebeat/88170/6 "2017-07-02T09:10:06Z")

</div>

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