Class ContainerMonitorService

java.lang.Object
com.ammann.servicemanager.service.ContainerMonitorService

@ApplicationScoped public class ContainerMonitorService extends Object
Scheduled background service that monitors Docker containers.

Performs two periodic tasks:

  • Checks for available image updates for remote containers (every 5 minutes).
  • Verifies that all containers are in the "running" state (every 30 seconds).

Local images (those without a registry prefix) are excluded from update checks because they cannot be pulled from a remote registry.

  • Constructor Details

    • ContainerMonitorService

      public ContainerMonitorService()
  • Method Details

    • checkForUpdates

      public void checkForUpdates()
      Iterates over all running containers and checks whether a newer image version is available in the remote registry. Local images are skipped.
    • healthCheck

      public void healthCheck()
      Logs a warning for each container that is not in the "running" state.