-
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
[Discuss] Refactor How libbeat features are activated for individual beats. #7093
Comments
We could also add a hook for |
I believe, the downside of this interface, is the capabilities would still be part of the binary, we might want to change that to make sure they are excluded at compile time. As @ruflin pointed out, we might want to have something similar to the outputs or processors. |
What about adding a configuration file to the generators which specifies which parts of libbeat should be copied to the vendor folder of a new Beat? Also, we could still keep the command line flags and prompting for answers when we need them.
This way everyone could generate a small Beat which satisfies their needs. However, I rather see my idea as a dream. I am not sure if it's feasible. |
@kvch <3 I think for simplicity it could a be a generated go file with the default and let the users opt-in or opt-out, since this is more an advanced use case I would not add anything to the generator. |
I like the idea from @kvch Instead of having to modify the vendor directory it could be an |
I did some progress on this which look like a nice way of doing it and allow enough flexibility and at the same time we can remove the init, syntax look like this. module.Bundle(
bootstrap.ModuleLogSystemInfo,
elasticsearch.Module,
logstash.Module,
kafka.Module,
), And the plugin is defined like this. var Module = outputs.Module("logstash", create) This is build from @urso works on plugin. Advatanges:
|
Bundle will merge the definition, so we can have something like this. var DefaultModules = module.Bundle(
elasticsearch.Module,
logstash.Module,
)
module.Bundle(
DefaultModules,
http.Module,
), |
ping @urso |
Backlog grooming: Closing it for now until further activity, can still be reopened if needed. |
When I was working on a function agent, I found the need to have an ephemeral beat, I mean a beat that doesn't write anything to disk, or executes any disk related actions, like creating new directories.
A custom beat developer should be able to tell libbeat what features to activate; we could provide a default sets of
capabilities.
This would mean we could break the core into these capabilities:
By default beats author have access to all the capabilities:
Advantages
Possible interface
This might be complicated if we merge multiple beats into one, we could solve this by adding the beat canonical name to the
Enable
method and do some validation at startup to make sure the capabilities are compatible.Each capability would be responsable to deal with validating his configuration.
The text was updated successfully, but these errors were encountered: