# Logstash adding duplicate rows for every run

**URL:** <https://discuss.elastic.co/t/logstash-adding-duplicate-rows-for-every-run/44775>\
**Category:** Logstash\
**Created:** [March 17, 2016, 9:20pm UTC](https://discuss.elastic.co/t/logstash-adding-duplicate-rows-for-every-run/44775 "2016-03-17T21:20:52Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![vikram\_yerneni](https://avatars.discourse-cdn.com/v4/letter/v/3ab097/32.png) [@vikram\_yerneni](https://discuss.elastic.co/u/vikram_yerneni)\
**Post date:** [March 28, 2016, 6:58pm UTC](https://discuss.elastic.co/t/logstash-adding-duplicate-rows-for-every-run/44775/11 "2016-03-28T18:58:39Z")

</div>

Hi Magnusbaeck, we fixed the issue with adding a if statement in the output section of logstash and added the document\_id portion over there..  
Here is the link.. I believe u r the one who suggested this over there: [http://stackoverflow.com/questions/30226940/logstash-output-to-elasticsearch-with-document-id-what-to-do-when-i-dont-have](http://stackoverflow.com/questions/30226940/logstash-output-to-elasticsearch-with-document-id-what-to-do-when-i-dont-have)

Thanks man..

---

_[View the full topic](https://discuss.elastic.co/t/logstash-adding-duplicate-rows-for-every-run/44775)._
