Getting Data In

how to get list of search peers via rest api

hiddenkirby
Contributor

I can't seem to find the list of indexer nodes (search peers) through the rest api on the search head.

any ideas?

its v 4.1

1 Solution

gkanapathy
Splunk Employee
Splunk Employee

Unsupported and undocumented, but there is an endpoint here: https://localhost:8489/services/search/distributed/peers, and here: https://localhost:8489/servicesNS/admin/-/search/distributed/peers

In general, you could go via the Splunk Manager UI to the admin page that lists out the items you're looking for, and see what URLs get hit in the splunkd_access.log file.

View solution in original post

hexx
Splunk Employee
Splunk Employee

If you are running Splunk 4.3 or higher, you can rely on the rest search command to obtain this list:

| rest /services/server/info | table splunk_server

Note that the following search will list all peers responding to distributed search but also the local search-head.

gkanapathy
Splunk Employee
Splunk Employee

Unsupported and undocumented, but there is an endpoint here: https://localhost:8489/services/search/distributed/peers, and here: https://localhost:8489/servicesNS/admin/-/search/distributed/peers

In general, you could go via the Splunk Manager UI to the admin page that lists out the items you're looking for, and see what URLs get hit in the splunkd_access.log file.

Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...