Report this

What is the reason for this report?

How can I retrieve a list of unhealthy droplets

Posted on January 16, 2020

I am looking to revtrieve a list of droplets which have failed the loadbalancer healthchecks and are currently “down”

The idea being I have a periodic script the runs, finds all the unhealhy/down droplets and replaces them with new ones.

The best I could find were some XHR requests made in the dashboard which look something like:

https://cloud.digitalocean.com/api/v1/load_balancers/combined_metrics/haproxy_backend_up?load_balancer_ids[]=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx&period=6hour

But that is not available via the API.

Does anyone know of a way to do this?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.