Skip to content

In certain scenarios, it may be necessary to manually shut down the Agent Proxy when the main container has exited, but the sidecar process continues to run. Instead of terminating the entire job, which may appear as a cancelled job, Aembit offers a solution to gracefully terminate the job while allowing the sidecar to continue operating.

The Agent Proxy can be shut down by sending an HTTP POST request to its /quit endpoint.

An example command using curl:

Terminal window
curl -X POST localhost:<HEALTH_CHECK_PORT>/quit

When the Agent Proxy is properly configured to receive this request, it will flush any remaining events to the backend before exiting gracefully.

The behavior of the Agent Proxy can be controlled through specific environment variables outlined below:

AEMBIT_ENABLE_HTTP_SHUTDOWN Environment Variable

This variable controls whether the Agent Proxy supports the /quit endpoint.

  • Default Value: false
  • Accepted Values: false or true

AEMBIT_SERVICE_PORT Environment Variable

This variable specifies the port on which the Agent Proxy responds to the diagnostic and configuration endpoint /quit.

  • Default Value: 51234
  • Accepted Values: an integer number in the range 1 to 65535 (inclusive)