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!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...