Deployment Architecture

Is there a REST API call for getting the status of a Search Head Cluster (SHC)?

sat94541
Communicator

Planning to use search head clustering and we need the ability to check search head cluster status by REST API call. Please advise if there is a capability to do so or if this will be coming in the near future.

1 Solution

rbal_splunk
Splunk Employee
Splunk Employee

Here are some examples that will work for you:

1) To check the Status, run the REST from any of the Search Head Cluster Members:

/services/shcluster/status   

2) Here is a REST call to check Captain/info:

 /services/shcluster/captain/info

3) To get the information on Cluster nodes/members that have joined the captain:

 /services/shcluster/captain/members

4) To get the information on Cluster Member Details:

/services/shcluster/member/info

5) To get information on artifacts and replicas DISCREPANCY:

/services/shcluster/member/artifacts

OR

/services/shcluster/captain/artifacts

6) Delegated jobs:

/services/shcluster/captain/jobs

7) Ongoing replication details:

/services/shcluster/captain/replications

View solution in original post

joesrepsolc
Communicator

I try to use these rest api links and get a prompt for a login/password. How to I avoid this? Still can't get our load balancer team (NetScaler) a link that works.

0 Karma

prithivip
Observer

Hi,
Were you able to figure out how to achieve this ?

I could not access REST API to monitor search head/Indexer peer members. When I hit https://localhost:8089/services/shcluster/member/consensus I'm getting page cannot be displayed. I verified splunk management port is listening from my machine.

My intention is to monitor each search Head and Indexer URL's individually via Load balancer. Your input would be much appreciated.
Thanks.

0 Karma

rbal_splunk
Splunk Employee
Splunk Employee

Here are some examples that will work for you:

1) To check the Status, run the REST from any of the Search Head Cluster Members:

/services/shcluster/status   

2) Here is a REST call to check Captain/info:

 /services/shcluster/captain/info

3) To get the information on Cluster nodes/members that have joined the captain:

 /services/shcluster/captain/members

4) To get the information on Cluster Member Details:

/services/shcluster/member/info

5) To get information on artifacts and replicas DISCREPANCY:

/services/shcluster/member/artifacts

OR

/services/shcluster/captain/artifacts

6) Delegated jobs:

/services/shcluster/captain/jobs

7) Ongoing replication details:

/services/shcluster/captain/replications

aljohnson_splun
Splunk Employee
Splunk Employee

Check out the docs on the REST API Cluster endpoints here.

e.g.

https://<host>:<mPort>/services/shcluster/member/consensus

Get latest cluster configuration from the raft consensus protocol.

curl -k -u admin:pass https://localhost:8189/services/shcluster/member/consensus
Get Updates on the Splunk Community!

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...