maple.utils.health
Container health monitoring utilities.
This module provides automatic health monitoring for Docker containers running policy backends and environments. It implements a background thread that periodically checks container health and can automatically restart failed containers.
Key features: - Periodic health checks with configurable intervals - Automatic restart on failure (optional) - Consecutive failure counting before marking unhealthy - Custom health check and restart callbacks - Thread-safe container registration - Real-time status reporting
The HealthMonitor class runs a daemon thread that continuously monitors registered containers and maintains their health status.
Classes
|
Thread-safe health monitor for Docker containers. |
|
Health status enumeration for monitored containers. |
|
Data class representing a container under health monitoring. |