Getting Data In

List just indexers that are offline

brent_weaver
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

harsmarvania57
Ultra Champion

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
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...