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

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...