Skip to content

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.

Use the following tabs to set change your Agent Controller’s log level using the AEMBIT_LOG_LEVEL environment variable:

  1. Log into your Agent Controller.

  2. Open the Aembit Agent Controller service at /etc/systemd/system/aembit_agent_controller.service.

    You may have to open this as root using sudo.

  3. Under [Service], update or add Environment=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_controller
    Restart=always
    Environment=AEMBIT_TENANT_ID=abc123
    Environment=AEMBIT_DEVICE_CODE=
    Environment=AEMBIT_AGENT_CONTROLLER_ID=A12345
    Environment=ASPNETCORE_URLS=http://+:5000,http://+:9090
    Environment=AEMBIT_LOG_LEVEL=<log_level>
    StandardOutput=journal
    StandardError=journal
    ...
  4. Reload the Aembit Agent Controller config:

    Terminal window
    systemctl daemon-reload
  5. Restart the Aembit Agent Controller service:

    Terminal window
    systemctl restart aembit_agent_controller.service

Use the following tabs to set change your Agent Proxy’s log level using the AEMBIT_LOG_LEVEL environment variable:

  1. Log into your Agent Proxy.

  2. Open the Aembit Agent Proxy service at /etc/systemd/system/aembit_agent_proxy.service.

    You may have to open this as root using sudo.

  3. Under [Service], update or add Environment=AEMBIT_LOG_LEVEL=<log_level>, and set the log level you want. For example:

    [Service]
    ...
    User=aembit_agent_proxy
    Restart=always
    StandardOutput=journal
    StandardError=journal
    TimeoutStopSec=20
    Nice=-20
    LimitNOFILE=65535
    Environment=AEMBIT_SIGTERM_STRATEGY=immediate
    Environment=AEMBIT_AGENT_CONTROLLER=https://my-proxy-service:5000
    Environment=AEMBIT_DOCKER_CONTAINER_CIDR=
    Environment=CLIENT_WORKLOAD_ID=
    Environment=AEMBIT_AGENT_PROXY_DEPLOYMENT_MODEL=vm
    Environment=AEMBIT_SERVICE_PORT=51234
    // highlight-next-line
    Environment=AEMBIT_LOG_LEVEL=<log_level>
    ...
  4. Reload the Aembit Agent Proxy config:

    Terminal window
    systemctl daemon-reload
  5. Restart the Aembit Agent Proxy service:

    Terminal window
    systemctl restart aembit_agent_proxy.service