-
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
Adding support for custom http headers and TLS for metricbeat modules #3945
Conversation
Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run. |
1 similar comment
Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run. |
66038ce
to
f485795
Compare
jenkins, test it |
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.
That is a great addition. It was already on my list to add headers and auth. What I really like about the PR is that it adds it all http based metricsets.
@@ -22,10 +25,42 @@ type HTTP struct { | |||
|
|||
// NewHTTP creates new http helper | |||
func NewHTTP(base mb.BaseMetricSet) *HTTP { | |||
config := struct { | |||
TLS *outputs.TLSConfig `config:"ssl"` |
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.
@urso as we start to using this in other places, we should probably move it out from the output package to ?
…elastic#3945) (cherry picked from commit 3f1c7c0)
…elastic#3945) (cherry picked from commit 3f1c7c0)
…elastic#3945) (cherry picked from commit 3f1c7c0)
This PR adds support to add TLS options when a user wants to hit HTTPS endpoints and also provide custom headers in case an endpoint has authentication enabled.
Example: