-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
config: complete Yaml support #9513
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Eduardo Silva <[email protected]>
Signed-off-by: Eduardo Silva <[email protected]>
Signed-off-by: Eduardo Silva <[email protected]>
edsiper
requested review from
leonardo-albertovich,
fujimotos and
koleini
as code owners
October 22, 2024 03:51
Signed-off-by: Eduardo Silva <[email protected]>
Signed-off-by: Eduardo Silva <[email protected]>
Signed-off-by: Eduardo Silva <[email protected]>
Signed-off-by: Eduardo Silva <[email protected]>
Signed-off-by: Eduardo Silva <[email protected]>
Signed-off-by: Eduardo Silva <[email protected]>
Signed-off-by: Eduardo Silva <[email protected]>
Signed-off-by: Eduardo Silva <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The following PR/branch implements the final pieces for full Yaml support. Components that are being added to Yaml
Parsers
Parsers are now supported in the main config file or through an included Yaml file, definition:
Note that this functionality is compatible with the old service
parsers_file
directive.Multiline Parsers
Multiline parsers combine logs that are split across multiple events into one, keeping the full message together, like with stack traces or detailed logs.
The current implementation in Yaml differs a bit in syntax from classic format, however there are no breaking changes. Here is an example of one multiline parser defined in the main file and other through an included file that also defines a similar section (multiline parser contain 2 rules):
Stream Processor
The stream processor is a little known but power functionality that allows to create new streams of data based on results done by SQL queries (including aggregation), when configured it runs right after the last filter (if set). The following is the new format to expose stream processor tasks in Yaml:
Plugins
While Fluent Bit ships with built-in plugins, it also supports to load external plugins at runtime, this mechanism is used to load Go or Wasm plugins which are built as shared object files (.so). Yaml is extended in two ways:
1. inline Yaml section
2. Yaml plugins file included through
service
sectionplugins_file
option:where
extra_plugins.yaml
might contain the definition described in 1:Upstream Servers
Certain output plugins supports mechanisms to connect to different endpoints through the definition of upstream servers. This PR introduces the new configuration format for Yaml.
The new directive
upstream_servers
can define blocks of upstreams servers that are composed by one or multiple nodes, the example below defines 2 upstreams and each one with it own nodes:This upstream servers can be now defined globally, however the output plugins that supports this functionality like Forward or Elasticsearch needs to add an extra configuration option to specify the upstream server to use: note that the current classic config mode they load a file and it assumes that's the only one supported.
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.