Cherry-pick #18605 to 7.x: [Elastic Log Driver] Create a config shim between libbeat and the user #18864
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.
Cherry-pick of PR #18605 to 7.x branch. Original message:
What does this PR do?
This PR adds a "config shim" for the plugin. This is currently a draft that hard-codes a number of fundamental configs needed for the plugin to run, as opposed to letting the user specify unlimited dot-config options that we may or may not have tested.
Why is it important?
Right now, the config system for the plugin is one of the most user-hostile components of the plugin. We expose "raw" libbeat config options similar to filebeat command line options. In the long-term, a config system like this is untenable, as specifying complex config logic, nested options, and lists is incredibly awkward and verbose. This means that right now, we have none of the upsides of using libbeat's config, and the downside of relatively verbose config flags for basic options, i.e,
output.elasticsearch.host
.Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
All supported config flags are documented and in
config.go
. Pull down the change, build the plugin on a docker host withmage BuildAndInstall
, then test with a command likedocker run -it --log-driver elastic/elastic-logging-plugin:8.0.0 --log-opt endpoint=griffon.nest:9200 debian:latest /bin/bash