Skip to content

Elastic Agent should have official support for HTTP_PROXY #25021

@ph

Description

@ph

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:

  1. Elastic Agent -> Fleet Server
  2. Elastic Agent -> artifact repo for beats and agent binaries
  3. 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:

  1. If proxy_disable is configured we ignore proxy settings in the configuration file and environment variables. All connection attempts are unproxied
  2. 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.
  3. 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

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions