-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Cherry-pick #21427 to 7.x: Add initial skeleton of filestream input #21442
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
filestream
input. The name of the input can be changed. The input was renamed fromlogfile
because we are not going to provide the same options as the currentlog
input. Aslogfile
is already used by Agent for thelog
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 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 theconfigure
function ofinput-logfile
returns aProspector
which finds inputs dynamically. Whereasinput-cursor
requires 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.asciidoc
orCHANGELOG-developer.next.asciidoc
.Related issues
First step #20243