<@ULVA73B9P> using Prefect 3.x is there an API to ...
# ask-marvin
c
@Marvin using Prefect 3.x is there an API to check the health of a worker? Is there an endpoint on the worker that can be called to check that the worker is alive?
m
Yes, Prefect 3.x provides an option to set up a health check server for workers. When starting a worker, you can use the
--with-healthcheck
option to enable a health check server. This allows you to check if the worker is alive and functioning properly. However, there might be some issues with this feature, particularly if you're using IPv6 addresses, as the worker health server currently listens only to IPv4 due to hardcoded configurations. For more details, you can check the Prefect documentation on workers. Additionally, there are GitHub issues discussing topics related to worker health checks, such as allowing customization of the worker's bind server address when dealing with different IP protocols, which you might find relevant (GitHub Issue). So, you can definitely keep an eye on your diligent little worker friends—just make sure their network environment supports it.