# Logstash fetched duplicate data from XML file

**URL:** <https://discuss.elastic.co/t/logstash-fetched-duplicate-data-from-xml-file/119163>\
**Category:** Logstash\
**Created:** [February 9, 2018, 5:34am UTC](https://discuss.elastic.co/t/logstash-fetched-duplicate-data-from-xml-file/119163 "2018-02-09T05:34:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Niranjan\_kaup](https://avatars.discourse-cdn.com/v4/letter/n/bc79bd/32.png) [@Niranjan\_kaup](https://discuss.elastic.co/u/Niranjan_kaup)\
**Post date:** [February 9, 2018, 5:34am UTC](https://discuss.elastic.co/t/logstash-fetched-duplicate-data-from-xml-file/119163/1 "2018-02-09T05:34:43Z")

</div>

LS always fetches old data from XML file whenever it runs. Below is my configuration. Due to that I see duplicate data entry in output. I expect from below conf LS only read updated data from file.

file {  
path =\> "/mnt/simpleci\_temp\_commit.xml"  
start\_position =\> "beginning"  
sincedb\_path =\> "/mnt/bitbucket/sincedb"  
codec =\> multiline {  
pattern =\> "\<item"  
negate =\> "true"  
what =\> "previous"  
auto\_flush\_interval =\> 1  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [February 12, 2018, 8:44pm UTC](https://discuss.elastic.co/t/logstash-fetched-duplicate-data-from-xml-file/119163/2 "2018-02-12T20:44:01Z")

</div>

And "updated data" means "the file has been rewritten with completely new content"?

---

<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:** [March 12, 2018, 8:44pm UTC](https://discuss.elastic.co/t/logstash-fetched-duplicate-data-from-xml-file/119163/3 "2018-03-12T20:44:03Z")

</div>

Closed on March 12, 2018, 8:44pm UTC

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