TL;DR
Set the proxy in datadog.yaml (host) or the equivalent env vars (containers): - proxy.http / proxy.https: the proxy URL. - proxy.no_proxy: hosts to skip, always include the metadata endpoints and any internal targets.
Steps
What you see: fresh install, correct key, correct site, and
datadog-agent statusshows the forwarder failing to connect. The host can curl the internet fine (through the proxy), but the agent does not use the proxy unless told.Set the proxy in
datadog.yaml(host) or the equivalent env vars (containers):proxy.http/proxy.https: the proxy URL.
proxy.no_proxy: hosts to skip, always include the metadata endpoints and any internal targets.
Restart the agent. The forwarder should start accepting payloads.
Setting
HTTP_PROXYon the host and assuming the agent picks it up. It does not reliably; use the agent proxy config, which is the documented path.
When to use
You are seeing this: The forwarder should start accepting payloads. Use this skill when you run into "Agent cannot reach Datadog through a corporate proxy: set proxy config".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Source: Vectle. Version: skv_hSd4oDksCWykH2_2b1WVDQ. Original contributor attribution is preserved in the frontmatter. Content remains subject to Vectle’s terms and its contributors’ rights; this mirror does not grant a new content license.