-
Notifications
You must be signed in to change notification settings - Fork 5k
Description
The documentation for clean_inactive says that file state can only be removed if the file is already ignored by Filebeat using the ignore_older setting. However, clean_inactive takes effect even when ignore_older is disabled.
The documentation also says that clean_inactive must be greater than ignore_older + prospector.scanner.check_interval. However, this constraint is ignored; clean_inactive is unaffected by ignore_older and prospector.scanner.check_interval, and regardless of their values the setting clean_inactive: 0 will always reingest all files every time Filebeat is run.
The documentation for the clean_inactive in filestream is identical to the documentation for the same flag in the log input, and accurately describes how the log input behaves: if clean_inactive is set without enabling ignore_older, or if clean_inactive < ignore_older + scan_frequency, the input reports a fatal configuration error on startup.
(Additionally, in the log input, setting clean_inactive: 0 disables the flag, and is the default setting. In the filestream input, setting clean_inactive: 0 enables the flag, and reingests everything immediately on startup. This difference is not mentioned in the documentation, but does not explicitly contradict it.)
Related issues / PRs:
- Filestream ignores
clean_inactive#36629 (before 8.14,clean_inactivewas documented the same as today, but was ignored unconditionally) - Fix clean_inactive for Filestream input #38632 (the initial implementation of
clean_inactivein filestream after the previous bug was noticed) - Filestream clean_inactive does not work as expected #40178 (reporting a more severe version of the current issue, where registry entries were removed after 30 minutes even without enabling
clean_inactive, but does not mention other symptoms) - [bug][filestream] - Fix filebeat GC cleanup bug #40258 (fixed the issue with deleting entries by default, but did not address the other behavior reported by the current issue)
- Filestream bases
clean_inactiveon process start time, not file update time #45600 (another current bug where time intervals related toclean_inactiveare calculated incorrectly)