Health check prefect 2 agent

Hello,

We are trying to deploy an aws ECS task for an agent and are wondering if there is a prefect 2 equivalent of the health check described in here How can I programmatically check whether Prefect agent is healthy?

This is needed to monitor our ecs tasks and destroy when the agent becomes unhealthy

2 Likes

I’d just like to second this as an issue of interest for my team as well.

As long as the agent’s ECS Task is running as a service in the ECS cluster, the agent will restart automatically.

See this diagram for more information:

Thanks for the follow up Tayor. Unfortunately we’re seeing behavior where Prefect 2 Agents get very sickly indeed and do not reset. Seems to be a common issue, judging from the discussion on a seemingly related Github issue Client sometimes fails with `httpx.LocalProtocolError` · Issue #7442 · PrefectHQ/prefect · GitHub