# Filebeat re-indexes old logs that have previously harvested

**URL:** <https://discuss.elastic.co/t/filebeat-re-indexes-old-logs-that-have-previously-harvested/170400>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [February 28, 2019, 7:29pm UTC](https://discuss.elastic.co/t/filebeat-re-indexes-old-logs-that-have-previously-harvested/170400 "2019-02-28T19:29:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hubertn](https://avatars.discourse-cdn.com/v4/letter/h/c5a1d2/32.png) [@hubertn](https://discuss.elastic.co/u/hubertn)\
**Post date:** [February 28, 2019, 7:29pm UTC](https://discuss.elastic.co/t/filebeat-re-indexes-old-logs-that-have-previously-harvested/170400/1 "2019-02-28T19:29:51Z")

</div>

We have a set logs file that roll over when it gets to a certain size; we keep 50 old files. We are using Log4Net to perform the log and roll over.

On average, we may have 2 to 10 files per day. We create daily index for the logs and removed the old index after certain days.

The issue is: the old indexes that are removed, somehow comes back in the next day. It appears as if filebeat re-processes the files that were read in previous day.

Note: The filebeat process is running continuously without stopping.

Filebeat version: 6.2.4.

---

<div class="post-metadata">

**Author:** ![pierhugues](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pierhugues/32/48383_2.png) [@pierhugues](https://discuss.elastic.co/u/pierhugues)\
**Post date:** [March 6, 2019, 4:41pm UTC](https://discuss.elastic.co/t/filebeat-re-indexes-old-logs-that-have-previously-harvested/170400/2 "2019-03-06T16:41:24Z")

</div>

@hubert It is possible that Filebeat has not completed reading the files before the index deletion happen?

---

<div class="post-metadata">

**Author:** ![hubertn](https://avatars.discourse-cdn.com/v4/letter/h/c5a1d2/32.png) [@hubertn](https://discuss.elastic.co/u/hubertn)\
**Post date:** [March 13, 2019, 5:30pm UTC](https://discuss.elastic.co/t/filebeat-re-indexes-old-logs-that-have-previously-harvested/170400/3 "2019-03-13T17:30:10Z")

</div>

it appeared that the file had different inode id when it was rolled over. We put some condition to re-ingest file not older that 24hr to reduce duplication. Is there a better solution to minized duplication.

---

<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:** [April 10, 2019, 5:30pm UTC](https://discuss.elastic.co/t/filebeat-re-indexes-old-logs-that-have-previously-harvested/170400/4 "2019-04-10T17:30:11Z")

</div>

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