Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filestream ignores clean_inactive #36629

Closed
belimawr opened this issue Sep 20, 2023 · 0 comments · Fixed by #38632
Closed

Filestream ignores clean_inactive #36629

belimawr opened this issue Sep 20, 2023 · 0 comments · Fixed by #38632
Assignees
Labels
Team:Elastic-Agent Label for the Agent team

Comments

@belimawr
Copy link
Contributor

Steps to Reproduce:

  1. Delete the two references for CleanInactive from the Filestream input
modified   filebeat/input/filestream/config.go
@@ -38,7 +38,6 @@ type config struct {
 	Close          closerConfig       `config:"close"`
 	FileWatcher    *conf.Namespace    `config:"prospector"`
 	FileIdentity   *conf.Namespace    `config:"file_identity"`
-	CleanInactive  time.Duration      `config:"clean_inactive" validate:"min=0"`
 	CleanRemoved   bool               `config:"clean_removed"`
 	HarvesterLimit uint32             `config:"harvester_limit" validate:"min=0"`
 	IgnoreOlder    time.Duration      `config:"ignore_older"`
@@ -98,7 +97,6 @@ func defaultConfig() config {
 		Reader:         defaultReaderConfig(),
 		Paths:          []string{},
 		Close:          defaultCloserConfig(),
-		CleanInactive:  0,
 		CleanRemoved:   true,
 		HarvesterLimit: 0,
 		IgnoreOlder:    0,
  1. Build Filebeat. It will build without issues, which means this config option is not being used.
  2. (Optionally) edit filebeat/tests/system/test_registrar.py so the test_clean_inactive test uses the filestream input instead of the log input:
modified   filebeat/tests/system/test_registrar.py
@@ -779,7 +779,8 @@ class Test(BaseTest):
             clean_inactive="3s",
             ignore_older="2s",
             close_inactive="0.2s",
-            scan_frequency="0.1s"
+            scan_frequency="0.1s",
+            type="filestream",
         )
  1. Run the test (from beats root)
cd filebeat
mage buildSystemTestBinary
source $(mage pythonVirtualEnv)/bin/activate
pytest -k test_clean_inactive ./tests/system/test_registrar.py
  1. The test will fail
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Sep 20, 2023
@pierrehilbert pierrehilbert added the Team:Elastic-Agent Label for the Agent team label Sep 20, 2023
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants