Docker Swarm requirements, installation script examples, and container removal steps

This Orion Platform topic applies only to the following products:


Docker Swarm is one of the environments supported by the Orion Platform's container monitoring feature.

To monitor Docker Swarm containers in the Orion Platform, you'll need:

  • Docker Engine 17.12 or later
  • Docker Compose file format 3.5 or later
  • SSH access to the master server
  • Sudo privileges on the master server

Docker Swarm installation script

When you add a container service on the Container Services page, the Add Container Service wizard generates a script that you can copy to the Windows Clipboard. Connect to the master server via SSH, open a command line, and run the script, which looks something like this:

curl -o cman-swarm.yaml #endpoint#
sed -i \"s/%HOSTNAME%/$(hostname)/g\" cman-swarm.yaml
sudo docker stack deploy -c cman-swarm.yaml sw

The script downloads the cman-swarm.yaml file, sets the hostname in the file to the master server, and starts a service named "sw" to deploy an sw_orionmonitor container to each server in the swarm.

Remove Orion container data from nodes in Docker Swarm

Before you delete a container service in the Orion Web Console, remove Orion containers and images from the nodes (or cluster of nodes) manually.

  1. Connect to the node via SSH.
  2. Need an SSH client? Try the free SolarWinds Solar-PuTTY tool.

  3. Run the following commands to remove the sw_orionaggregator and sw_orionmonitor services:
    sudo docker service rm sw_orionaggregator
    sudo docker service rm sw_orionmonitor
  4. Run the following command to get a list of images and note the IDs for and weaveworks/scope:latest.
    sudo docker images
  5. Run the following command for each image:
    sudo docker rmi [image_id]

The service status switches to Down on the Container Services page. Now you can delete the container service by selecting its check box and clicking Delete.