How to change Edge Component log levels
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
On Windows, you set the log level by passing AEMBIT_LOG_LEVEL as an MSI property
when you install or upgrade Agent Controller.
-
Run
msiexecto install or upgrade Agent Controller withAEMBIT_LOG_LEVELset to your desired log level:Terminal window msiexec /i <agent_controller_msi> /l*v install.log `AEMBIT_TENANT_ID=<TENANT_ID> `AEMBIT_AGENT_CONTROLLER_ID=<CONTROLLER_ID> `AEMBIT_STACK_DOMAIN=<STACK_DOMAIN> `AEMBIT_LOG_LEVEL=<log_level> -
Verify the log level change by checking Agent Controller logs at:
Terminal window C:\ProgramData\Aembit\AgentController\Logs
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:Terminal window [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
On Windows, you set the log level by passing AEMBIT_LOG_LEVEL as an MSI property
when you install or upgrade Agent Proxy.
-
Run
msiexecto install or upgrade Agent Proxy withAEMBIT_LOG_LEVELset to your desired log level:Terminal window msiexec /i <agent_proxy_msi> /l*v install.log `AEMBIT_AGENT_CONTROLLER=<AC_HOSTNAME>:5000 `AEMBIT_LOG_LEVEL=<log_level> -
Verify the log level change by checking Agent Proxy logs at:
Terminal window C:\ProgramData\Aembit\AgentProxy\Logs