Getting Data In
Highlighted

List just indexers that are offline

Builder

I am working on my AWS scaling scripts and wanted to know if anyone knows of a way I can just list cluster-peers that are offline? I would to be able to script the cluster removal of the dead node if I scale in/down. I could script around using shoe cluster-status but I would prefer to not have to.

I also welcome any thoughts you may have around this process!

Thanks!

0 Karma
Highlighted

Re: List just indexers that are offline

SplunkTrust
SplunkTrust

Hi @brent_weaver,

You can use rest api to fetch those details using below command

curl -k -u admin:<password> https://<host>:<mPort>/services/cluster/master/peers

Above command will give you output in XML format, if you want output in JSON format you can use below command

curl -k -u admin:<password> https://<host>:<mPort>/services/cluster/master/peers?output_mode=json

And from output of above command you can filter data which you require in your script.

I hope this helps.

Thanks,
Harshil

0 Karma