Network Management

Exited Docker Swarm containers remain visible in container widget after polling stops in SolarWinds Platform

The containers that are not running are still showing in the Container widget.

First published date

3/10/2026 2:13 PM

Last published date

3/10/2026 3:33 PM

Overview

In SolarWinds Platform container monitoring, Docker Swarm containers that have exited but still exist on the Swarm nodes continue to appear in the UI Container Widget even though they are no longer being polled. 

 

This is expected behavior: the platform only cleans up container entities after they are reported as deleted and have exceeded the configured retention window.

By design, “Exited” in Docker/Swarm means the container process has stopped, but the container object still exists.

OSH will continue to display such containers while they exist in Docker/Swarm. Only containers reported as deleted are subject to the deleted‑container cleanup logic.

Default cleanup behavior:

  • By default, the SolarWinds Platform clears all data, including images, for containers that report as being deleted for over 7 days.

  • Deleted containers appear in container widgets for this retention period and then disappear automatically.

Product section

Orion Platform

Cause

This behavior occurs because of the combination of Docker Swarm container lifecycle and platform cleanup rules:

  1. Exited containers still exist in Swarm

    • In Docker Swarm, a container in state Exited is not removed automatically; it is simply stopped.

    • The Swarm environment (and therefore the OSH container monitor) still sees these containers as valid objects.

  2. SolarWinds cleans up only containers reported as “deleted”

    • The platform’s container cleanup job only purges containers that have been reported as deleted for longer than the configured maximum deleted age (default effectively around 7 days in the UI behavior).

    • If the container remains present (even if exited) on the Docker Swarm node, it is not considered deleted and will not be removed by the cleanup job.

  3. Cleanup schedule and retention are controlled by configuration

    On the SolarWinds Platform server, the advanced container management configuration includes keys such as:

    <add key="MaxDeletedContainerAgeInMinutes" value="60" />
    <add key="CleanupJobInterval" value="480" />
    
    • MaxDeletedContainerAgeInMinutes – maximum age for deleted containers before they are purged (in minutes).

    • CleanupJobInterval – how often the cleanup job runs (in minutes).

    If these values are left at defaults or set too high, deleted containers will remain visible for longer than desired. However, even with very low values, containers that are only “Exited” (not deleted) will still be shown until they are removed in Docker Swarm.

  4. Docker Swarm‑specific behavior when decommissioning Orion services

    For Docker Swarm container monitoring, SolarWinds deploys Swarm services (for example, sw_orionaggregator and sw_orionmonitor). When these services and their images are not removed correctly from the Swarm nodes, stale container data can also persist in the platform until cleanup catches up.

Resolution

1.  Clean up exited containers in Docker Swarm

On the Docker Swarm nodes, remove the exited containers so they stop being reported to OSH.

  1. List exited containers on a Swarm node:

    docker ps -a --filter status=exited
    
  2. Remove only the containers you no longer need:

    docker rm <container_id_1> <container_id_2> ...
    
  3. (Optional but powerful) If you are sure you want to remove all exited containers on a node:

    docker container prune
    

    Use this with caution in production, as it removes every exited container on that host.

Once these containers are removed at the Docker/Swarm level, the OSH collector will no longer see them and they will transition into the “deleted” state in the platform, making them eligible for automatic cleanup after the configured retention window.

2- Confirm or adjust deleted‑container retention settings

If the goal is to have deleted containers disappear more quickly from the UI, verify and (optionally) tune the container cleanup configuration on the SolarWinds Platform server.

  1. On the main polling engine, locate:

    C:\Program Files\SolarWinds\Orion\SolarWinds.Orion.ContainerMgmt.BusinessLayer.dll.config
    
  2. Open the file in a text editor with administrative permissions and find the relevant keys:

    <add key="MaxDeletedContainerAgeInMinutes" value="60" />
    <add key="CleanupJobInterval" value="480" />
    
    • MaxDeletedContainerAgeInMinutes

      • Defines how long deleted containers are retained before being purged.

      • Example: 60 = containers deleted more than 60 minutes ago are eligible for removal.

    • CleanupJobInterval

      • Defines how often the cleanup job runs.

      • Example: 480 = cleanup runs every 480 minutes (8 hours).

3-  Save the file.

4- Restart SolarWinds Platform services so the new settings take effect.