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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...