Hi. I'm looking to get the state of an instance vi...
# troubleshooting
r
Hi. I'm looking to get the state of an instance via API call. I see that
GET/instances/{instanceName}
gives certain info. Looking to specifically get instance state. Anyone here tried something similar?
m
Do you want the state of the instance, or the state of individual segments on that instance? If latter, you can look for the externalView api.
r
Looking for the state of the instance. I'm trying to write a shell script for untagging instances that are dead.
@Mayank To clarify, I'm looking for an API that will give me the value the "Status" column in Cluster Manager.
m
The
Alive
status you see is not really being served from a rest-api that you can directly call, unfortunately. Could you elaborate on the instances being dead? If you are on k8s, the pod should be recreated?
r
No instances are currently dead in our clusters. But it has happened previously. We're attempting to periodically run checks to see if any are dead, untag those and then rebalance the tables that were using them.
m
Are you on-prem or on the cloud? And are you using k8s?
In the ZK browser you can get the LIVEINSTANCES list, but that is not a rest-api
r
@Mayank we are on cloud (AWS) and run on ec2. We do not use kubernetes. Do you have a suggestion for how we might automate removal of dead nodes if we cannot do it via API?
m
Cleanest option would be to add an endpoint (should be fairly straightforward), others might find it useful too. Until then, perhaps look at the LIVEINSTANCES on ZK
thankyou 1