synthetic-monitoring-agent icon indicating copy to clipboard operation
synthetic-monitoring-agent copied to clipboard

Allow for a proxy to be set for the synthetics binary

Open jamesvarty opened this issue 3 years ago • 2 comments

Our network does not allow for "un-proxied" traffic out to grafanacloud backend from the synthetics agent(private probe) Setting the environment/systemd proxy does not seem to solve the outbound pusher.go traffic, generating the following events.

{"level":"error","program":"synthetic-monitoring-agent","subsystem":"publisher","tenant":<removed>,"error":"sending events: context deadline exceeded","time":1669087903507,"message":"publish events"} {"level":"error","program":"synthetic-monitoring-agent","subsystem":"publisher","tenant":<removed>,"error":"sending timeseries: context deadline exceeded","time":1669087913601,"message":"publish metrics"}

A proxy flag to set the outbound http(s)_proxy should solve this.

jamesvarty avatar Nov 22 '22 03:11 jamesvarty

It should already work. We are using Go's http client, so something like export HTTP_PROXY="http://host:port" should do it. This needs to be set in the environment from which the agent is started.

mem avatar Nov 23 '22 22:11 mem

Thanks for the response @mem, I simply have this running in a docker container with known HTTP(s)_PROXY defined.

Just to be clear the "context deadline exceeded" in the logs is the pusher timing out trying to send the events to synthetic-monitoring-grpc-* correct?

jamesvarty avatar Nov 24 '22 22:11 jamesvarty