Health Check

Konfigurieren Sie einen Docker-Health-Check für den WinCC OA-Container, damit der Remote-Webserver wartet, bis der Dienst bereit ist, anstatt beim Start wiederholt Verbindungsversuche zu unternehmen. Ein Skript WinCC OA_health prüft regelmäßig den Managerstatus und den internen Fehlerzustand anhand eines definierten Schwellenwerts (z. B. weniger als 100 Fehlerpunkte), um den Container als gesund zu markieren, was Docker Compose mithilfe von depends_on mit der Bedingung service_healthy erzwingen kann.

Video Information

Length
1:32
Language
English

Transcript

Docker containers can report their health status. When our remote web server starts, the WinCC OA server is not yet ready to accept connections. As a result, the web server retries the connection after 20 seconds.

If the WinCC OA container includes a health check that indicates when the service is ready, the web server container could wait for it before attempting start.

The WinCC OA_health checks script is executed regularly to monitor the state of the WinCC OA managers using PMO. Additionally, it evaluates the internal WinCC OA error state via the docker health checked at ctrl script ensuring the system remains below a defined threshold e.g. fewer than 100 failure points to be considered healthy in a docker composed file.

This health check can be integrated using the depends underscore on directive with a condition service option. This allows the remote web server container to wait until the WinCC OA service is confirmed to be healthy before starting.

As a result, the web server container now correctly waits to start until the WinCC OA server is fully ready and marked as healthy.