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

ansible: add splunk_otel_collector_no_proxy variable #2482

Merged
merged 2 commits into from
Jan 18, 2023

Conversation

tchernomax
Copy link
Contributor

IFAIK when you need to monitor an https vhost on localhost on a proxied environment you need to add the vhost on the NO_PROXY environment variable (event if localhost is used).

    smartagent/http_toto:
      type: http
      host: 127.0.0.1
      port: 443
      useHTTPS: true
      noRedirects: true
      sniServerName: www.toto.com
      httpHeaders:
        Host: www.toto.com
      path: /up.php
      desiredCode: 200
      regex: '^OK$'

will not worked on a proxied environment if NO_PROXY=localhost,127.0.0.1,::1 ; for it to work we need NO_PROXY=localhost,127.0.0.1,::1,www.toto.com
So we need a way to set NO_PROXY.

@tchernomax tchernomax requested review from a team as code owners January 17, 2023 13:29
@rmfitzpatrick
Copy link
Contributor

Thanks for the update. The current template logic may be problematic for determining when to use this on setting NO_PROXY alone:

when: splunk_otel_collector_proxy_http != "" or splunk_otel_collector_proxy_https != ""
. You could add a non-default value check but that would lead to empty values for the proxy env vars.

@tchernomax
Copy link
Contributor Author

tchernomax commented Jan 17, 2023

@rmfitzpatrick

The current template logic may be problematic for determining when to use this on setting NO_PROXY alone …

There is no point setting splunk_otel_collector_no_proxy without setting splunk_otel_collector_proxy_http(s) (no_proxy is basically an "exclude" on http(s)_proxy , so if http(s)_proxy aren't used/set there is no point setting no_proxy). So I don't think we should change the when:.

@rmfitzpatrick
Copy link
Contributor

rmfitzpatrick commented Jan 17, 2023

There is no point setting splunk_otel_collector_no_proxy without setting splunk_otel_collector_proxy_http(s)

It's a bit of an edge case but I think proxy env vars set via DefaultEnvironment or through another mechanism would be overwritten for the agent service.

edit: The way you've documented the var addresses this concern, so makes sense to use as is.**

@atoulme atoulme merged commit 5935731 into signalfx:main Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants