Configure proxy settings for Elastic Agent components
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability This functionality is generally available and ready for production usage. The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability This functionality is generally available and ready for production usage. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes. Elastic Agent can run in OpenTelemetry mode to retrieve traces, metrics, and logs from your infrastructure and applications, and forward them to Elastic Observability. Availability This functionality is generally available and ready for production usage. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Serverless Observability
Generally available
Stack
Generally available
Elastic Agent
Generally available
When running the Elastic Agent in environments that require outbound traffic to go through a proxy, you must explicitly configure proxy settings.
You may need to configure a proxy if:
- Your app is deployed behind a corporate proxy or firewall.
- Your telemetry is sent to Elastic APM in Elastic Cloud or another hosted destination.
- Network errors such as
Connection timed outorSSL handshake failedappear in logs.
| Variable | Description |
|---|---|
| HTTP_PROXY | URL of the proxy server for HTTP requests |
| HTTPS_PROXY | URL of the proxy server for HTTPS requests |
| NO_PROXY | Comma-separated list of hosts to exclude |
Most Elastic Agent components honor common proxy environment variables. The following examples show how to configure them:
docker run -e HTTP_PROXY=http://<proxy.address>:<port> \
-e HTTPS_PROXY=http://<proxy.address>:<port> \
otel/opentelemetry-collector:latest
services:
edotcollector:
environment:
- HTTP_PROXY=http://<proxy.address>:<port>
- HTTPS_PROXY=http://<proxy.address>:<port>
env:
- name: HTTP_PROXY
value: '<proxy.address>:<port>'
- name: HTTPS_PROXY
value: '<proxy.address>:<port>'
[Service]
Environment="HTTP_PROXY=http://<proxy.address>:<port>"
Environment="HTTPS_PROXY=http://<proxy.address>:<port>"
Environment="NO_PROXY=<address1>,<address2>"
For the Elastic Agent, proxy support applies to all exporters, including those using gRPC. No special configuration is needed beyond the environment variables.
If you're using an SDK that doesn't support proxy variables directly, consider routing telemetry through the Elastic Agent configured with proxy settings. This ensures consistent proxy handling. For more information, refer to Proxy settings for EDOT SDKs.