-
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
Adopt parsers
in all Filebeat inputs
#26130
Comments
Pinging @elastic/agent (Team:Agent) |
May I vote for multiline in the unix input? It is the closest thing Filebeat has to a fifo. Immensely useful for injecting arbitrary logs with netcat without messing with log directories or restarting Filebeat. |
One test is added that runs Filebeat reading from a journald file, it only tests one parser, however that should be enough to ensure parsers are supported on journald input. Splits from elastic#26130
@kvch @nimarezainia what are the missing ones on which we should work? |
Ideally, all of them. But TCP, UDP, UNIX should be done by our team. For the other inputs, I have to track down others to see if it makes sense to add parsers, and bug them to add if necessary. |
Those are the missing inputs where there is no parsers so far.
@masci those ones seems to belong to the @elastic/obs-cloud-monitoring team. Could you please create the appropriate issues if it's relevant?
@elastic/security-external-integrations those ones seems to belong to your area, could you please create the appropriate issues and check them if it is not needed.
@rameshelastic those ones belongs to the @elastic/obs-service-integrations team, could you take them on your behalf.
@cmacknz those ones belong to us, let's try to make it happened. |
Hi! We're labeling this issue as |
Goal
Parsers are the successors of readers of the
log
input. They provide a more flexible message parsing. At the moment they are only available in thefilestream
input. But the functionality could be useful in other inputs.We have to inspect all available inputs in Filebeat to see if it makes sense to add
parsers
. If the answer is yes, then the feature should be added.Parsers
How to add parsers to an input
1. Add parsers code to the input
The
parser.Config
object has its ownUnpack
function, so it is enough for you to add it as an attribute to your configuration.Then create the parser based on the configuration. The
Create
function expects areader.Reader
as a parameter it can read from.Example configuration accepted by the code above
2. Add
parsers
to the reference configurationAdd the reference configuration to either
filebeat/_meta/config/filebeat.inputs.reference.yml.tmpl
x-pack/filebeat/_meta/config/filebeat.inputs.reference.yml.tmpl
3. Add
parsers
to the documentation of the inputThere is no common parsers section at the moment because it might not make sense to document all parsers for every input.
Inputs
- [ ] Containermust use filestream input in the future- [ ] Dockermust use filestream input in the future- [ ] Logmust use filestream input in the future- [ ] Stdinwill be deprecated- [ ] Syslogsyslog will be a parserparsers
to UNIX input #27858The text was updated successfully, but these errors were encountered: