# How to avoid duplicated logs

**URL:** <https://discuss.elastic.co/t/how-to-avoid-duplicated-logs/138871>\
**Category:** Kibana\
**Created:** [July 6, 2018, 9:16am UTC](https://discuss.elastic.co/t/how-to-avoid-duplicated-logs/138871 "2018-07-06T09:16:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![asalma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/asalma/32/32199_2.png) [@asalma](https://discuss.elastic.co/u/asalma)\
**Post date:** [July 6, 2018, 9:16am UTC](https://discuss.elastic.co/t/how-to-avoid-duplicated-logs/138871/1 "2018-07-06T09:16:40Z")

</div>

Hi,

As you can see I have the same log duplicated two times or more :

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/f/df38e55fb856840ef6c25b016a721bc7751ad653.png)

How can I resolve this please ?

---

<div class="post-metadata">

**Author:** ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)\
**Post date:** [July 6, 2018, 11:35am UTC](https://discuss.elastic.co/t/how-to-avoid-duplicated-logs/138871/2 "2018-07-06T11:35:52Z")

</div>

Hi @asalma,

How are you ingesting your logs into Elasticsearch? If you can generate your own document `_id`, then you can use that to prevent duplicate documents from being indexed.

---

<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:** [August 3, 2018, 11:36am UTC](https://discuss.elastic.co/t/how-to-avoid-duplicated-logs/138871/3 "2018-08-03T11:36:00Z")

</div>

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