Getting Data In

How to disable a search peer via the CLI or REST API call?

tsunamii
Path Finder

Hi Splunkers,

Is there a way to disable a search peer via the CLI or an API call?

Specifically, I would like to set this param via CLI or REST API, and without having to restart splunk:

# distsearch.conf
disabled_servers = <comma separated list of servers>
* A list of configured but disabled search peers.

Thanks.

0 Karma
1 Solution

splunkIT
Splunk Employee
Splunk Employee

I have tested the following commands in my 6.3.3 search head, and appears to be working:

To enable search peer:

curl -ku admin https://<host>:<mPort>/servicesNS/-/search/search/distributed/peers/<search_peer_host>%3A<mPort>/ena... -X POST

To disable search peer:

curl -ku admin https://<host>:<mPort>/servicesNS/-/search/search/distributed/peers/<search_peer_host>%3A<mPort>/dis... -X POST

View solution in original post

splunkIT
Splunk Employee
Splunk Employee

I have tested the following commands in my 6.3.3 search head, and appears to be working:

To enable search peer:

curl -ku admin https://<host>:<mPort>/servicesNS/-/search/search/distributed/peers/<search_peer_host>%3A<mPort>/ena... -X POST

To disable search peer:

curl -ku admin https://<host>:<mPort>/servicesNS/-/search/search/distributed/peers/<search_peer_host>%3A<mPort>/dis... -X POST
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 ...