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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

A Four-Part Event Series: Full Stack Observability For the AI Era

As AI reshapes applications, infrastructure, and the way teams operate, the traditional boundaries of ...

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Event Series: Level up your SOC: Advancing with Splunk Enterprise Security

AI has fundamentally raised the stakes for security operations, and this three-part series is your guide to ...