Getting Data In

| rest /services/cluster/master/peers

Builder

I have a SH cluster and an Index cluster all running 7.1.7. I'm trying to access the cluster/master/peers endpoint by executing this search:

| rest /services/cluster/master/peers

When I run this on a SH, I get this error:

REST Processor: Failed to fetch REST endpoint uri=https://127.0.0.1:8089/services/cluster/master/peers?count=0 from server https://127.0.0.1:8089. Check that the URI path provided exists in the REST API.
When I run it on the CM, I get this error:
Unexpected status for to fetch REST endpoint uri=https://127.0.0.1:8089/services/cluster/master/peers?count=0 from server=https://127.0.0.1:8089 - Service Unavailable
Either way, this message gets logged by each of the indexer peers no matter where I run the rest command:
10-16-2019 09:28:39.947 -0500 INFO ClusterMasterPeerHandler - master is not enabled on this node

Anyone know why I can't access this rest endpoint?

0 Karma
1 Solution

Communicator

The rest endpoint you're hitting there is for indexer clustering and will only work on an indexer cluster master. If you are trying to get the status of all distributed search peers then use |rest /services/search/distributed/peers/

Also if you want to avoid errors from downstream search peers, then you should specify the splunk_server=
For the case of getting indexer cluster peers you would do like
|rest /services/cluster/master/peers splunk_server=ClusterMasterNameGoesHere and then it won't try to distribute the rest command to all search peers, and avoid them throwing errors.

View solution in original post

0 Karma

Communicator

The rest endpoint you're hitting there is for indexer clustering and will only work on an indexer cluster master. If you are trying to get the status of all distributed search peers then use |rest /services/search/distributed/peers/

Also if you want to avoid errors from downstream search peers, then you should specify the splunk_server=
For the case of getting indexer cluster peers you would do like
|rest /services/cluster/master/peers splunk_server=ClusterMasterNameGoesHere and then it won't try to distribute the rest command to all search peers, and avoid them throwing errors.

View solution in original post

0 Karma

Builder

Thank you very much for the response. It does not work when I run the command on the CM - I posted the error above. But it does work when I add splunk_server=.

0 Karma