Skip to main content
Version: 3.7.0

Docker

This section describes how to run SmartAgent as a Docker container to achieve full-stack injection.
If you are using Docker runtime only, without any orchestration platforms (such as Kubernetes/Swarm), use this method.

warning

Supported on Linux only

Limitations

  • SmartAgent can only access disks mounted inside the container, therefore it can only collect metrics from those accessible disks.
  • The system preload configuration file ld.so.preload will not be modified during installation, hence processes running on the host machine (non-container processes) are not supported.
  • Auto-update is not supported.

Installation

  1. Log in to the Bonree ONE platform and go to Configuration > Agent Installation > SmartAgent > Docker.

  2. Copy the command and replace the parameters accordingly:

    TypeParameterDescription
    Environment VariableSMARTAGENT_INSTALLER_SCRIPT_URLThe URL copied with wget from the Web agent download page.
    Environment VariableSMARTAGENT_INSTALL_PATHInstallation path (must be an absolute path, not the root directory).
    Environment VariableSMARTAGENT_INSTALLER_DOWNLOAD_TOKENAuthentication token required for downloading with SMARTAGENT_INSTALLER_SCRIPT_URL.
    Install Parameter<INSTALLER_PARAMETERS>All SmartAgent installation parameters are supported except for --target. See Installation Parameters.

    Example command:

    docker run -d \
    --name smartagent \
    --restart=unless-stopped \
    --privileged=true \
    --pid=host \
    --net=host \
    -v /:/mnt/root \
    -e SMARTAGENT_INSTALLER_SCRIPT_URL=<REPLACE_WITH_YOUR_URL> \
    -e SMARTAGENT_INSTALL_PATH=/opt \
    -e SMARTAGENT_INSTALLER_DOWNLOAD_TOKEN='<TOKEN>' \
    docker.bonree.com/agent/smartagent:1.0 \
    config <INSTALLER_PARAMETERS>
  3. Restart the business containers you want to monitor.

Start/Stop and Update

When the container starts, SmartAgent will automatically download the latest version from the specified URL, install, and run it.

docker restart smartagent