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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...