Skip to content
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 #8449 to 6.4: Allow to pass config overrides via the Settings Struct #8815

Merged
merged 1 commit into from
Oct 30, 2018

Conversation

ph
Copy link
Contributor

@ph ph commented Oct 30, 2018

Cherry-pick of PR #8449 to 6.4 branch. Original message:

Sometime a custom beat that get executed want to override system
defaults instead of relying on code defined by libbeat.

This is the case with beatless, the queue has limits and flush values
that make sense when the beat is run on the edge but not on on AWS lambda.

Note that settings is passed via liberal common.Config no type checking is
done. I went that route because many parts of beats doesn't expose the
config struct outside of the package.

This is similar to explicitely defining them in the yaml.

Notes: this part of the code is pretty hard to unit test, we have to do some refactoring to make it happen :(

* Allow to pass config overrides via the Settings Struct

Sometime a custom beat that get executed want to override system
defaults instead of relying on code defined by libbeat.

This is the case with beatless, the queue has limits and flush values
that make sense when the beat is run on the edge but not on on AWS lambda.

Note that settings is passed via liberal common.Config no type checking is
done. I went that route because many parts of beats doesn't expose the
config struct outside of the package.

This is similar to explicitely defining them in the yaml.

(cherry picked from commit 4a03bb3)
@ph ph requested a review from tsg October 30, 2018 12:33
@ph ph merged commit 0e91827 into elastic:6.4 Oct 30, 2018
@ph ph deleted the backport_8449_6.4 branch October 30, 2018 13:43
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
…he Settings Struct (elastic#8815)

Cherry-pick of PR elastic#8449 to 6.4 branch. Original message: 

Sometime a custom beat that get executed want to override system
defaults instead of relying on code defined by libbeat.

This is the case with beatless, the queue has limits and flush values
that make sense when the beat is run on the edge but not on on AWS lambda.

Note that settings is passed via liberal common.Config no type checking is
done. I went that route because many parts of beats doesn't expose the
config struct outside of the package.

This is similar to explicitely defining them in the yaml.

**Notes:** this part of the code is pretty hard to unit test, we have to do some refactoring to make it happen :(
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants