Sorry if this has been asked before, but I am pretty much baffled now and can't get this working.
Fleet Managed Agents.
Problem: Elastic agents aren't sending data through the proxy to Elasticsearch.
Steps taken so far:
1st - I added "--proxy-url=http://domain:port" to my powershell script, as well as a powershell proxy profile - everything runs fine, it downloads and registers the agent as I can see it in Fleet Agents....
2nd) I checked fleet.yml and can see this added the proxy URL to the .yml config, still nothing
3rd) I tried adding proxy environment variables:
Set-ItemProperty "HKLM:SYSTEM\CurrentControlSet\Services\Elastic Agent" -Name Environment -Value http://internal-proxy-nlb.vpc7.restofdomain.com:3128
Restart-Service "Elastic Agent" - yep still nothing....
4th) Tried adding the proxy url to the elastic-agent.yml file - but I think this may be incorrect due to it being fleet managed.
I can see bits and bats hitting the proxy when restarting the agent or installing it, etc. but when I try force some data through to elastic, just nothing, not even attempting to hit the Proxy at all.
The only thing I haven't tried is adding the proxy url to the output in "Elasticsearch output configuration (YML)" under fleet settings, is this where I am suppose to set the proxy up?
And if so, is there anyway to add to HTTP urls as these agents go to AWS instances in different regions which have there own proxies with the ability to add more Proxy URLs in future?