# Filebeat appending new lines even if there is change only in existing line

**URL:** <https://discuss.elastic.co/t/filebeat-appending-new-lines-even-if-there-is-change-only-in-existing-line/135207>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [June 9, 2018, 3:11am UTC](https://discuss.elastic.co/t/filebeat-appending-new-lines-even-if-there-is-change-only-in-existing-line/135207 "2018-06-09T03:11:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yenike\_Raghu\_Ram](https://avatars.discourse-cdn.com/v4/letter/y/7ea924/32.png) [@Yenike\_Raghu\_Ram](https://discuss.elastic.co/u/Yenike_Raghu_Ram)\
**Post date:** [June 9, 2018, 3:11am UTC](https://discuss.elastic.co/t/filebeat-appending-new-lines-even-if-there-is-change-only-in-existing-line/135207/1 "2018-06-09T03:11:15Z")

</div>

Say like in original file I ve 2 lines  
a  
b  
We've modified one line say 'a'  
now output file in logstash is like  
a -- original data  
b  
a -- modified data  
b  
I am expecting it to be like log file to have only two lines as with my original log file which has two lines , but with modified data in one of lines  
a -- modified data  
b

Following is my filebeat prospectors and log stash conf

filebeat.prospectors:

- type: log  
paths:
  - directory/\*.html  
output.logstash:  
hosts: ["ipaddress"]

input {  
beats {  
port =\> 5048  
}  
}  
output {  
stdout { codec =\> rubydebug }  
file  
{  
codec =\> line {  
format =\> "%{[message]}"  
}  
path =\> "C:/Program Files/logstash-6.2.3/testPractice/LogsCollected/DebugLog09May2018/OneTwo.html}  
}

Attached original file and log stash file observe that in log stash file for each every change in line all lines are appended

 ![original](https://us1.discourse-cdn.com/elastic/original/3X/4/2/42384e7f7f4c692b4a790d833f32246e75d8d64e.PNG) ![logstash](https://us1.discourse-cdn.com/elastic/original/3X/e/c/eca0a663036720d39363cf04ccd828df42029227.PNG)

---

<div class="post-metadata">

**Author:** ![kvch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kvch/32/72058_2.png) [@kvch](https://discuss.elastic.co/u/kvch)\
**Post date:** [June 12, 2018, 8:05am UTC](https://discuss.elastic.co/t/filebeat-appending-new-lines-even-if-there-is-change-only-in-existing-line/135207/2 "2018-06-12T08:05:01Z")

</div>

What do you see instead of the expected output?

---

<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, 2018, 8:05am UTC](https://discuss.elastic.co/t/filebeat-appending-new-lines-even-if-there-is-change-only-in-existing-line/135207/3 "2018-07-10T08:05:02Z")

</div>

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