# When disable close\_removed, why also need disable clean\_removed

**URL:** <https://discuss.elastic.co/t/when-disable-close-removed-why-also-need-disable-clean-removed/286188>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [October 8, 2021, 7:02am UTC](https://discuss.elastic.co/t/when-disable-close-removed-why-also-need-disable-clean-removed/286188 "2021-10-08T07:02:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![honghong516](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/honghong516/32/95576_2.png) [@honghong516](https://discuss.elastic.co/u/honghong516)\
**Post date:** [October 8, 2021, 7:02am UTC](https://discuss.elastic.co/t/when-disable-close-removed-why-also-need-disable-clean-removed/286188/1 "2021-10-08T07:02:43Z")

</div>

##### `close_removed` [edit](https://github.com/elastic/beats/edit/7.15/filebeat/docs/inputs/input-common-file-options.asciidoc)

When this option is enabled, Filebeat closes the harvester when a file is removed. Normally a file should only be removed after it’s inactive for the duration specified by `close_inactive` . However, if a file is removed early and you don’t enable `close_removed` , Filebeat keeps the file open to make sure the harvester has completed. If this setting results in files that are not completely read because they are removed from disk too early, disable this option.

_his option is enabled by default. **If you disable this option, you must also disable `clean\_removed** _ .

---

<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:** [November 5, 2021, 9:02am UTC](https://discuss.elastic.co/t/when-disable-close-removed-why-also-need-disable-clean-removed/286188/2 "2021-11-05T09:02:58Z")

</div>

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