AxonOps agent behind a proxy¶
If your network does not have direct internet access and it requires a proxy to connect to the AxonOps Server, you will need to configure the AxonOps agent to use it.
To configure the AxonOps agent to use a proxy, you can use a systemd override. This is the recommended approach as it keeps your configuration separate from the agent's default service file.
-
Create an override file for the
axon-agentservice:sudo systemctl edit axon-agent.service -
This will open an editor with a blank file. Add the following content, replacing
your_proxy_serverandportwith your proxy's details:[Service] Environment="https_proxy=http://your_proxy_server:port" Environment="http_proxy=http://your_proxy_server:port" Environment="no_proxy=localhost,127.0.0.1"If your proxy requires authentication, use the following format:
[Service] Environment="https_proxy=http://user:password@your_proxy_server:port" Environment="http_proxy=http://user:password@your_proxy_server:port" Environment="no_proxy=localhost,127.0.0.1" -
Save the file and exit the editor.
systemdwill automatically reload the configuration. -
Restart the
axon-agentto apply the changes:sudo systemctl restart axon-agent -
You can verify that the environment variables have been applied by checking the service's status:
systemctl status axon-agent