Skip to content

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

Merged
faec merged 6 commits intoelastic:masterfrom
faec:proxy-override
May 23, 2019
Merged

[libbeat] Add output.elasticsearch.proxy_disable flag#12243
faec merged 6 commits intoelastic:masterfrom
faec:proxy-override

Conversation

@faec
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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