-
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
Load template by default, depending on the version #1993
Conversation
Not complete yet, but I'd like your feedback on the new config options @elastic/beats. |
} | ||
} | ||
|
||
err = json.Unmarshal(body, &response) |
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.
make sure body is fully consumed and closed correctly. Otherwise underlying connection can not be re-used (go http module uses keep-alive in order to reuse TCP connections) + need to time out underlying connection in order to close socket.
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.
This should be the case already because the body is coming from a call to execHTTPRequest
which does ReadAll
and Close
.
Comments mostly addressed, let's see if tests pass. |
jenkins, retest it |
jenkins, retest it |
# These settings can be adjusted to load your own template or overwrite existing ones. | ||
|
||
# Set to false to disable template loading. | ||
# template.enabled: true |
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.
Remove the space after #
LGTM. Only two minor comments. |
This queries Elasticsearch for the version and choses between the default template file (specified by the `template.path` option) and the ES 2x version of the template file (specified by the new `template.versions.2x.path` option). There's also a change in the defaults. With all the template options commented out, the code now loads the template. Previously, the template loading was the default via the sample configs only. I also did a small change in the output plugins API, now they receive the beatname in a clean way. Fixes elastic#1740.
LGTM. Waiting for green, but will ignore appveyor. |
Since we removed the template stuff from the default config, we can add the user/pass instead so it's easy to enabled https. It also updates the sample user/pass used, to match the default in Shield, closing elastic#1735. Depends on elastic#1993.
This queries Elasticsearch for the version and choses between the
default template file (specified by the
template.path
option) andthe ES 2x version of the template file (specified by the new
template.versions.2x.path
option).There's also a change in the defaults. With all the template
options commented out, the code now loads the template. Previously,
the template loading was the default via the sample configs only.
I also did a small change in the output plugins API, now they receive
the beatname in a clean way.
Fixes #1740.