Heartbeat behind proxy

I am running heartbeat in a container. The version of the heartbeat is heartbeat:8.1.0. My heartbeat is running behind the proxy and output to the elastic cloud.

In the docker-compose.yml

environment:
  HTTP_PROXY: "http://xxxxx:port"
  http_proxy: "http://xxxxxxx:port"
  HTTPS_PROXY: "https://xxxxx:port"
  https_proxy: "https://xxxxx:port"

In the heartbeat.yml

cloud.id: "xxxxxxxxxxxxx"
cloud_auth: xxxxxxxxxxxxxxxxxxx

Once I bring up the beat, I get error:

Error dialing EOF

I would like to ask what is the correct way to set up the proxy for heartbeat ?
Also, what is the possible issue that cause this error?

Thanks

Hi @sulfred,

Thanks for raising this issue. Just to clarify, the required proxy lives between heartbeat container and ES?

If that's the case, this configuration should work:

output.elasticsearch:
  proxy_url: "http://host.docker.internal:3128"  --> Local proxy test

cloud.id: "xxxxxxxxxxx"
cloud.auth: "xxxxxxxxxxx"

HTTP_PROXY environment variable is probably picked up by the underlying Go libraries and applying to all requests, including those to the monitored endpoints.

1 Like

Thanks, this is working

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.