Getting Data In

| rest /services/cluster/master/peers

_smp_
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

anthonymelita
Contributor

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

anthonymelita
Contributor

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.

_smp_
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
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...