All the beats support and respect HTTP_PROXY configuration either as an environment variable or as a direct configuration in the Elasticsearch output. We'll add official support to Elastic Agent so that it also uses a proxy for these connections:
- Elastic Agent -> Fleet Server
- Elastic Agent -> artifact repo for beats and agent binaries
- Inputs -> services being monitored
Users will set the proxy using the HTTP_PROXY environment variable at the host level. This is a standard place to set the behavior across OSes and vendors. Users can still disable or override this settings where the configuration allows.
The priority will follow our existing settings for Elasticsearch:
- If
proxy_disable is configured we ignore proxy settings in the configuration file and environment variables. All connection attempts are unproxied
- If proxy support is not disabled and
proxy_url is configured we always use that URL. This can be defined in an input or an output.
- If proxy support is not disabled and no proxy url is set we rely on the environment variables
HTTP_PROXY, HTTPS_PROXY, and NO_PROXY (see http.ProxyFromEnvironment).
We also need to document how users can set the proxy connection https://github.com/elastic/observability-docs/issues/593
Out of scope:
- Add a new flag to the enroll subcommand
- Add a setting in Fleet to configure the proxy
All the beats support and respect
HTTP_PROXYconfiguration either as an environment variable or as a direct configuration in the Elasticsearch output. We'll add official support to Elastic Agent so that it also uses a proxy for these connections:Users will set the proxy using the HTTP_PROXY environment variable at the host level. This is a standard place to set the behavior across OSes and vendors. Users can still disable or override this settings where the configuration allows.
The priority will follow our existing settings for Elasticsearch:
proxy_disableis configured we ignore proxy settings in the configuration file and environment variables. All connection attempts are unproxiedproxy_urlis configured we always use that URL. This can be defined in an input or an output.HTTP_PROXY,HTTPS_PROXY, andNO_PROXY(see http.ProxyFromEnvironment).We also need to document how users can set the proxy connection https://github.com/elastic/observability-docs/issues/593
Out of scope: