# Filebeat and Multiline Problem

**URL:** <https://discuss.elastic.co/t/filebeat-and-multiline-problem/58831>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [August 24, 2016, 2:22pm UTC](https://discuss.elastic.co/t/filebeat-and-multiline-problem/58831 "2016-08-24T14:22:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kryten](https://avatars.discourse-cdn.com/v4/letter/k/58956e/32.png) [@Kryten](https://discuss.elastic.co/u/Kryten)\
**Post date:** [August 24, 2016, 2:22pm UTC](https://discuss.elastic.co/t/filebeat-and-multiline-problem/58831/1 "2016-08-24T14:22:48Z")

</div>

Hi,

I'm using Filbeat 1.2.3 on Windows and seeing a problem with multiline and would appreciate someone pointing out what I must be doing wrong.

I'm sending my Filebeat events to Logstash. Here are the relevant configs:-

**Filebeat target file content:**

lineone  
linetwo  
linethree  
linefour  
linefive

**Filebeat.yml**

* * *

filebeat:  
prospectors:  
-  
input\_type: log  
paths:  
- "E:/target/\*.txt"

multiline:  
pattern: 'linethree'  
match: before

logging:  
files:  
rotateeverybytes: 10485760

output:  
logstash:  
hosts: ["xxxxxx:6379"]  
index: filebeat

**Logstash config file:**

input {

```
beats {
	port => 6379
}

```

}  
filter {  
# Filters go here as required

}

output {

stdout {

```
    codec => rubydebug
} 

```

}

What I get (on the Logstash stdout):  
{  
"message" =\> "linetwo",  
"@version" =\> "1",  
"@timestamp" =\> "2016-08-24T13:41:13.849Z",  
"count" =\> 1,  
"fields" =\> nil,  
"beat" =\> {  
"hostname" =\> "xxxxxx",  
"name" =\> "xxxxxx"  
},  
"type" =\> "log",  
"input\_type" =\> "log",  
"offset" =\> 32574,  
"source" =\> "E:\target\sampledata.txt",  
"host" =\> "xxxxxx",  
"tags" =\> [  
[0] "beats\_input\_codec\_plain\_applied"  
]  
}  
{  
"message" =\> "linethree",  
"@version" =\> "1",  
"@timestamp" =\> "2016-08-24T13:41:13.849Z",  
"type" =\> "log",  
"fields" =\> nil,  
"source" =\> "E:\target\sampledata.txt",  
"offset" =\> 32583,  
"input\_type" =\> "log",  
"count" =\> 1,  
"beat" =\> {  
"hostname" =\> "xxxxxx",  
"name" =\> "xxxxxx"  
},  
"host" =\> "xxxxxx",  
"tags" =\> [  
[0] "beats\_input\_codec\_plain\_applied"  
]  
}  
{  
"message" =\> "linefour",  
"@version" =\> "1",  
"@timestamp" =\> "2016-08-24T13:41:13.849Z",  
"count" =\> 1,  
"type" =\> "log",  
"input\_type" =\> "log",  
"source" =\> "E:\target\sampledata.txt",  
"offset" =\> 32594,  
"fields" =\> nil,  
"beat" =\> {  
"hostname" =\> "xxxxxx",  
"name" =\> "xxxxxx"  
},  
"host" =\> "xxxxxx",  
"tags" =\> [  
[0] "beats\_input\_codec\_plain\_applied"  
]  
}  
{  
"message" =\> "linefive",  
"@version" =\> "1",  
"@timestamp" =\> "2016-08-24T13:41:13.849Z",  
"source" =\> "E:\target\sampledata.txt",  
"offset" =\> 32604,  
"type" =\> "log",  
"input\_type" =\> "log",  
"count" =\> 1,  
"beat" =\> {  
"hostname" =\> "xxxxxx",  
"name" =\> "xxxxxx"  
},  
"fields" =\> nil,  
"host" =\> "xxxxxx",  
"tags" =\> [  
[0] "beats\_input\_codec\_plain\_applied"  
]  
}

My question, is why is line three "linethree" not being appended to line two "linetwo"? Is that not what should happen?

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [August 24, 2016, 2:35pm UTC](https://discuss.elastic.co/t/filebeat-and-multiline-problem/58831/2 "2016-08-24T14:35:33Z")

</div>

can you correctly format (use `</>` button) the config files? YAML (the config file format) is sensitive to indentation and characters used. It seems multiline is not applied at all, which might a problem due to faulty intendation (use 2 spaces per level + no tabs).

---

<div class="post-metadata">

**Author:** ![Kryten](https://avatars.discourse-cdn.com/v4/letter/k/58956e/32.png) [@Kryten](https://discuss.elastic.co/u/Kryten)\
**Post date:** [August 24, 2016, 3:49pm UTC](https://discuss.elastic.co/t/filebeat-and-multiline-problem/58831/3 "2016-08-24T15:49:34Z")

</div>

@steffens  
Thank you - yes, it was a broken line in the YAML. All working now 🙂

---

<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:** [September 14, 2016, 2:22pm UTC](https://discuss.elastic.co/t/filebeat-and-multiline-problem/58831/4 "2016-09-14T14:22:56Z")

</div>

This topic was automatically closed after 21 days. New replies are no longer allowed.
