https://prefect.io logo
Title
r

Rikimaru Yamaguchi

04/03/2023, 11:17 AM
Hello. I would like to do a health check on my agent. I think it is reasonable to use the following API for that.
<https://api.prefect.cloud/api/accounts/{account_id}/workspaces/{workspace_id}/work_queues/{id}/status>
Is there an SDK available? Or is there a better way to do health checks?
r

redsquare

04/03/2023, 11:20 AM
curl -v -H 'Authorization: Bearer <replace with your api key>' <https://api.prefect.cloud/api/accounts/><your accound id>/workspaces/<workspace_id>/health
r

Rikimaru Yamaguchi

04/03/2023, 11:23 AM
Thank you. But I want to do a health check on the agent server.
r

redsquare

04/03/2023, 11:24 AM
ah sorry miss read
🙌 1
perhaps https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/work_queues.py#L106 which will give you the last time a given agent polled the queue
r

Rikimaru Yamaguchi

04/03/2023, 1:18 PM
thank you! i will try it
👍 1