Sometimes, you’ll want to use a different value than an Agent Controller’s or Agent Proxy’s default value for logging. For example, when troubleshooting a problem with your agent or when trying out a new feature.
The following sections detail how to change the log level of your:
See Log level reference for complete details about each agent’s log levels.
Change Agent Controller log level
Section titled “Change Agent Controller log level”Use the following tabs to set change your Agent Controller’s log level using the AEMBIT_LOG_LEVEL
environment
variable:
-
Log into your Agent Controller.
-
Open the Aembit Agent Controller service at
/etc/systemd/system/aembit_agent_controller.service
.You may have to open this as root using
sudo
. -
Under
[Service]
, update or addEnvironment=AEMBIT_LOG_LEVEL=<log_level>
, and set the log level you want. For example:/etc/systemd/system/aembit_agent_controller.service [Service]...User=aembit_agent_controllerRestart=alwaysEnvironment=AEMBIT_TENANT_ID=abc123Environment=AEMBIT_DEVICE_CODE=Environment=AEMBIT_AGENT_CONTROLLER_ID=A12345Environment=ASPNETCORE_URLS=http://+:5000,http://+:9090Environment=AEMBIT_LOG_LEVEL=<log_level>StandardOutput=journalStandardError=journal... -
Reload the Aembit Agent Controller config:
Terminal window systemctl daemon-reload -
Restart the Aembit Agent Controller service:
Terminal window systemctl restart aembit_agent_controller.service
Change Agent Proxy log level
Section titled “Change Agent Proxy log level”Use the following tabs to set change your Agent Proxy’s log level using the AEMBIT_LOG_LEVEL
environment
variable:
-
Log into your Agent Proxy.
-
Open the Aembit Agent Proxy service at
/etc/systemd/system/aembit_agent_proxy.service
.You may have to open this as root using
sudo
. -
Under
[Service]
, update or addEnvironment=AEMBIT_LOG_LEVEL=<log_level>
, and set the log level you want. For example:[Service]...User=aembit_agent_proxyRestart=alwaysStandardOutput=journalStandardError=journalTimeoutStopSec=20Nice=-20LimitNOFILE=65535Environment=AEMBIT_SIGTERM_STRATEGY=immediateEnvironment=AEMBIT_AGENT_CONTROLLER=https://my-proxy-service:5000Environment=AEMBIT_DOCKER_CONTAINER_CIDR=Environment=CLIENT_WORKLOAD_ID=Environment=AEMBIT_AGENT_PROXY_DEPLOYMENT_MODEL=vmEnvironment=AEMBIT_SERVICE_PORT=51234// highlight-next-lineEnvironment=AEMBIT_LOG_LEVEL=<log_level>... -
Reload the Aembit Agent Proxy config:
Terminal window systemctl daemon-reload -
Restart the Aembit Agent Proxy service:
Terminal window systemctl restart aembit_agent_proxy.service