I need to find the number of Active Servers, Servers Failed Over, Servers Down and Servers Pending form Server nodes REST API or cluster details (/pools/default) API, something similar to cluster overview homepage.
As I understood a node is
Active if ‘clusterMemebrship’ === 'active’
Failed over if ‘clusterMemebrship’ === 'inactiveFailed’
Down if ‘status’ !== 'healthy’
and I think finding Pending nodes are more tricky and it is not enough to find nodes with ‘clusterMembership’ !== ‘active’
could you please let me know if I am on the right track and also guide me how to filter pending nodes?