Cherry-pick #21427 to 7.x: Add initial skeleton of filestream input#21442
Cherry-pick #21427 to 7.x: Add initial skeleton of filestream input#21442kvch merged 1 commit intoelastic:7.xfrom
Conversation
## What does this PR do? This PR adds the skeleton of the new `filestream` input. The name of the input can be changed. The input was renamed from `logfile` because we are not going to provide the same options as the current `log` input. As `logfile` is already used by Agent for the `log` input, it is easier to adopt a new input with a different name. The PR seems big, but the contents of `filebeat/input/filestream/internal/input-logfile` is basically the same as `filebeat/input/v2/input-cursor`. It is separated into a different folder because when the time comes, we would like to unify the two input types. The main difference between the two inputs is that the `configure` function of `input-logfile` returns a `Prospector` which finds inputs dynamically. Whereas `input-cursor` requires a list of paths without globbing. The following files need review: * filebeat/input/filestream/input.go * filebeat/input/filestream/internal/input-logfile/fswatch.go * filebeat/input/filestream/internal/input-logfile/harvester.go * filebeat/input/filestream/internal/input-logfile/input.go * filebeat/input/filestream/internal/input-logfile/prospector.go * filebeat/input/filestream/prospector.go The others are the same as `input-cursor`. Also, updated tests are coming in a new PR. ## Related issues First step elastic#20243 (cherry picked from commit cb624cf)
|
Pinging @elastic/integrations-services (Team:Services) |
💔 Tests FailedExpand to view the summary
Build stats
Test stats 🧪
Test errorsExpand to view the tests failures
Steps errorsExpand to view the steps failures
Log outputExpand to view the last 100 lines of log output
|
Cherry-pick of PR #21427 to 7.x branch. Original message:
What does this PR do?
This PR adds the skeleton of the new
filestreaminput. The name of the input can be changed. The input was renamed fromlogfilebecause we are not going to provide the same options as the currentloginput. Aslogfileis already used by Agent for theloginput, it is easier to adopt a new input with a different name.The PR seems big, but the contents of
filebeat/input/filestream/internal/input-logfileis basically the same asfilebeat/input/v2/input-cursor. It is separated into a different folder because when the time comes, we would like to unify the two input types. The main difference between the two inputs is that theconfigurefunction ofinput-logfilereturns aProspectorwhich finds inputs dynamically. Whereasinput-cursorrequires a list of paths without globbing.The following files need review:
The others are the same as
input-cursor.Also, updated tests are coming in a new PR.
Why is it important?
This is the first step toward the new input which collects log lines.
Checklist
- [ ] I have made corresponding changes to the documentation- [ ] I have made corresponding change to the default configuration files- [ ] I have added tests that prove my fix is effective or that my feature works- [ ] I have added an entry inCHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.Related issues
First step #20243