Install SolarWinds Observability Agent as a Docker image
You can deploy Agents using a Docker image and use the Agent for OTel integrations. When adding an integration, just select the deployed Agent to install the appropriate integration plugin on it.
Before you begin, review the limitations and supported environment variables.
If you plan to use the Agent for monitoring a database, enable host monitoring after you have deployed the Agent.
When you already have the Agent running, specify what you want to monitor. See Add entities for monitoring .
Download the Docker image
The Agent Docker image is periodically pushed to the DockerHub repository. To pull it, run the following command:
docker pull solarwinds/swo-agent:latest
You can also browse available tags on https://hub.docker.com/r/solarwinds/swo-agent
.
Run the image as a Docker container without using Docker volumes
When working with SolarWinds Observability Agents, SolarWinds recommends that you use Docker volumes to store local data, such as manifests, logs, or plugin data between the restarts of the Docker container. Sensitive information, such as encryption keys for credential support, must be stored locally for security reasons and should not be synchronized with SolarWinds Observability.
When running Agent Docker image with docker run
, all the plugins, manifests, and logs will be destroyed after the container is stopped. After each start of the container, the Agent will communicate with the cluster and download a list of installed plugins and their configuration.
Run the following command to start the container and print the output from the uamsclient
process:
docker run -it --rm -e UAMS_CLIENT_ID_OVERRIDE="<your uams client id override>" -e UAMS_ACCESS_TOKEN="<your access token to communicate with the cluster>" -e SWO_URL="<xx-yy.cloud.solarwinds.com>" solarwinds/swo-agent:latest
Example command with UAMS_OVERRIDE_HOSTNAME and UAMS_CONTAINER_HOSTNAME variable
docker run -it --rm -e UAMS_CLIENT_ID_OVERRIDE="<your uams client id override>" -e UAMS_ACCESS_TOKEN="<your access token to communicate with the cluster>" -e SWO_URL="<xx-yy.cloud.solarwinds.com>" -e UAMS_OVERRIDE_HOSTNAME="<custom hostname>" -e UAMS_CONTAINER_HOSTNAME="<custom hostname>" solarwinds/swo-agent:latest
You need to provide an access token, an endpoint for your organization, and a Client ID override as the required environment variables.
Logs
Logs from Agent and plugins are available in the following location in the container /var/log/solarwinds/uamsclient
Use Docker volumes
Use a volume as a working directory
SolarWinds recommends that you use a Docker volume as the working directory of the Agent running in the container. The Docker volume is used to preserve the state of the application (installed plugins, current manifests, credentials store) between runs of the container. This way, plugins don't need to be downloaded and installed after each start of the container, which speeds up the startup process.
To use the volume, create it first by running:
docker volume create uams-volume
Then you can mount the volume in the following location in the container /uamsclient/workdir
:
docker run -d --name=uams-client --rm=true -v uams-volume:/uamsclient/workdir -e UAMS_CLIENT_ID_OVERRIDE="<client id>" -e UAMS_ACCESS_TOKEN="<token>" -e SWO_URL="<xx-yy.cloud.solarwinds.com>" solarwinds/swo-agent:latest
Persist logs
To keep logs from the Agent, you need to mount your local directory to the logs location in the container /var/log/solarwinds/uamsclient
:
docker run -d --name=uams-client --rm=true -v ${PWD}:/var/log/solarwinds/uamsclient -e UAMS_CLIENT_ID_OVERRIDE="<client id>" -e UAMS_ACCESS_TOKEN="<token>" -e SWO_URL="<xx-yy.cloud.solarwinds.com>" solarwinds/swo-agent:latest
Replace ${PWD} by global path to your local directory where you want save logs from the container.
Provide a custom configuration
To override the configuration of the Agent, you need to mount the config.yaml
.
Editing the config.yaml
is an advanced process and might impact the operation of the SolarWinds Observability Agent. Use it with caution.
-
Prepare the configuration file with correct values on the host machine.
-
Mount the
config.yaml
in the container in this location/uamsclient/config/config.yaml
. -
Test the configuration by using docker run:
docker run -d --name=uams-client --rm=true -v ${PWD}/config.yaml:/uamsclient/config/config.yaml -e UAMS_CLIENT_ID_OVERRIDE="<client id>" -e UAMS_ACCESS_TOKEN="<token>" -e SWO_URL="<xx-yy.cloud.solarwinds.com>" dockerhub.solarwinds.com:55555/uams/uamsclient:latest
When specifying the file on the host, provide the global path (hence the ${PWD}
part in the command).
Use docker-compose
To run the Agent Container using docker-compose, use the file below:
services:
uamsclient:
image: solarwinds/swo-agent:latest
environment:
UAMS_CLIENT_ID_OVERRIDE: <client id>
UAMS_ACCESS_TOKEN: <token>
SWO_URL: <organization endpoint>
UAMS_CONTAINER_HOSTNAME: <custom hostname>
UAMS_OVERRIDE_HOSTNAME: <custom hostname>
volumes:
- ./config.yaml:/uamsclient/config/config.yaml
- uamsclient-volume:/uamsclient/workdir
volumes:
uamsclient-volume: {}