-
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
Enable Logstash output #13345
Enable Logstash output #13345
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my notes concerning beatsOverrides vs conditional overrides.
Check: isElasticsearch, | ||
Config: esOverrides, | ||
}, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
neat I haven't thought about doing it this way.
@@ -122,7 +132,7 @@ func Read(out interface{}, path string) error { | |||
// Load reads the configuration from a YAML file structure. If path is empty | |||
// this method reads from the configuration file specified by the '-c' command | |||
// line flag. | |||
func Load(path string, beatOverrides *common.Config) (*common.Config, error) { | |||
func Load(path string, beatOverrides *common.Config, conditionalOverrides []ConditionalOverride) (*common.Config, error) { | |||
var config *common.Config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we merge BeatsOverrides
with conditionalsOverrides
, the only difference between the two is that one of them should be applied all the time. No?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, after taking a walk I realized that they could be in the same list. :D
Also there is a few hound comments that appear valid to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM.
Failing tests are unrelated. |
This PR enables Logstash output for Functionbeat. The option
pipelining
is set to 0 to send events synchronously.From now on configuration overrides also depend on the selected output. So I introduced a new setting
cfgfile.ConditionalOverride
for Beats. This lets developers define a function which is if evaluated to true, the corresponding config overrides are applied.Closes #11757