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

[libbeat] Add output.elasticsearch.proxy_disable flag #12243

Merged
merged 6 commits into from
May 23, 2019

Conversation

faec
Copy link
Contributor

@faec faec commented May 22, 2019

Add a flag that can disable output proxy settings even if they are set in environment variables (HTTP_PROXY, etc., as specified in the Golang http package). This was requested because specifying a blank Proxy field will still fall back to the environment variables, which may not be easily modified by the caller, especially on windows. Setting proxy_disable can bypass all proxies with only a configuration change.

Resolves #11713.

@faec faec requested a review from a team as a code owner May 22, 2019 19:58
@faec faec requested a review from ph May 22, 2019 19:58
@faec faec requested review from a team as code owners May 22, 2019 20:03
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.

LGTM

// I'm not entirely satisfied with this approach, but it seems by nature of
// golang's proxy handling that we can't do better without a multi-machine
// integration test.
func TestProxyDisableOverridesProxySettings(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I am okay with this strategy.

@ph
Copy link
Contributor

ph commented May 23, 2019

@faec Can you add a changelog entry?

@faec faec merged commit 57c54a9 into elastic:master May 23, 2019
@faec faec deleted the proxy-override branch May 23, 2019 16:24
DStape pushed a commit to DStape/beats that referenced this pull request Aug 20, 2019
Add a `proxy_disable` output flag that can disable output proxy settings even if they are set in environment variables (HTTP_PROXY, etc., as specified in [the Golang http package](https://golang.org/pkg/net/http/#ProxyFromEnvironment)). This was requested because specifying a blank Proxy field will still fall back to the environment variables, which may not be easily modified by the caller, especially on windows. Setting proxy_disable can bypass all proxies with only a configuration change.

Resolves elastic#11713.
@svncsvr
Copy link

svncsvr commented Dec 10, 2019

starting with version 7.3.0 we are getting connection problem behind proxy no matter what the value is for proxy_disable. Same config works with 7.2.1

@faec
Copy link
Contributor Author

faec commented Dec 10, 2019

starting with version 7.3.0 we are getting connection problem behind proxy no matter what the value is for proxy_disable. Same config works with 7.2.1

This change was already in 7.2 (and typically has no effect), so if you're having proxy trouble upgrading from 7.2.1 to 7.3.0 it's probably caused by something else. You can try asking about your configuration in our discussion forums, or if you already have enough context to provide a bug report you can submit an issue. Thanks!

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.

[Filebeat] No way to disable use of proxy config defined in env
3 participants