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

Enable Logstash output #13345

Merged
merged 6 commits into from Aug 27, 2019
Merged

Conversation

kvch
Copy link
Contributor

@kvch kvch commented Aug 26, 2019

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

Copy link
Contributor

@ph ph left a 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,
},
}
Copy link
Contributor

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.

x-pack/functionbeat/magefile.go Show resolved Hide resolved
@@ -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
Copy link
Contributor

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?

Copy link
Contributor Author

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

@ph
Copy link
Contributor

ph commented Aug 26, 2019

Also there is a few hound comments that appear valid to me.

Copy link
Contributor

@ph ph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM.

@kvch
Copy link
Contributor Author

kvch commented Aug 27, 2019

Failing tests are unrelated.

@kvch kvch merged commit c9c55c4 into elastic:master Aug 27, 2019
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.

Add Logstash output for Functionbeat
3 participants