Introduction
Section titled “Introduction”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.
Agent Proxy Shutdown
Section titled “Agent Proxy Shutdown”The Agent Proxy can be shut down by sending an HTTP POST
request to its /quit
endpoint.
Example Command
Section titled “Example Command”An example command using curl
:
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.
Configuration Flags
Section titled “Configuration Flags”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
ortrue
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)