Splunk Enterprise

Unable to put the kvstore in maintenance mode

Raja1
Engager

KV Store maintenance mode change can only be done on static captain.

Labels (1)
0 Karma

livehybrid
Super Champion

You will not be able to put the KV Store into maintenance mode with a dynamic captain, to get around this you can temporarily change to a static captain using the following command

/opt/splunk/bin/splunk edit shcluster-config -mode member -captain_uri https://your-Captain-SH-address:8089 -election false

After this you should be able to check that dynamic_captain is 0 (splunk show shcluster-status) and then be able to enable maintenance mode.

 

Please let me know how you get on and consider upvoting/karma this answer if it has helped.
Regards

Will

0 Karma

Raja1
Engager

Is there a rest call to set the election as false from the captain for each cluster member , instead of logging into each seach head member and running the command 

/opt/splunk/bin/splunk edit shcluster-config -mode member -captain_uri https://your-Captain-SH-address:8089 -election false

 

0 Karma

Raja1
Engager

Am trying to set the kvstore captain in maintenance mode, but when i try set the kvstore captain in maintenance mode, it says that maintenance mode can only be set on the "static captain"

I can switch to static captain using the following command successfully
splunk edit shcluster-config -mode captain -captain_uri <URI>:<management_port> -election false

But i have to set election to false on  non-captain members for which am trying to the curl command which fails

curl -k -u username:password -X POST -d '{"mode":"member", "captain_uri":"https://captain.example.net:port","election":"false","target_uri":"https://member.example.net:port"}' https://member.example.net:port/services/shcluster/config/
<?xml version="1.0" encoding="UTF-8"?>
<response>
<messages>
<msg type="ERROR">Cannot perform action "POST" without a target name to act on.</msg>
</messages>
</response>


As per the documentation I can only see the get call (https://docs.splunk.com/Documentation/Splunk/9.4.2/RESTREF/RESTcluster#shcluster.2Fconfig)

Are there any other alternatives to set the election=false for the non-captain members remotely


 

0 Karma

livehybrid
Super Champion

Hi @Raja1 

You cannot set a static captaincy using the POST request, instead use the following:

To switch to a static captain, reconfigure each cluster member to use a static captain:

  1. On the member that you want to designate as captain, run this CLI command:
splunk edit shcluster-config -mode captain -captain_uri <URI>:<management_port> -election false

 

2. On each non-captain member, run this CLI command:
splunk edit shcluster-config -mode member -captain_uri <URI>:<management_port> -election false

🌟 Did this answer help you? If so, please consider:

  • Adding karma to show it was useful
  • Marking it as the solution if it resolved your issue
  • Commenting if you need any clarification

Your feedback encourages the volunteers in this community to continue contributing

Raja1
Engager

@livehybrid , thank you for your response, unfortunately we need to set the election to false remotely on each member . So guess that is not possible with api call as we do not have POST.

 

Will look into other possibilities. Thank you again

0 Karma

Raja1
Engager

Thank you for the suggestion. We were able to restore kvstore even without changing the dynamic captain

 

0 Karma

livehybrid
Super Champion

Hi @Raja1 Do you now get a different error? What do you see in Splunkd.log and mongod.log, or in the CLI output?

Thanks

0 Karma

kiran_panchavat
Influencer

@Raja1Can you clarify further? What exactly are you looking for ?

Did this help? If yes, please consider giving kudos, marking it as the solution, or commenting for clarification — your feedback keeps the community going!
0 Karma
Get Updates on the Splunk Community!

Dashboards: Hiding charts while search is being executed and other uses for tokens

There are a couple of features of SimpleXML / Classic dashboards that can be used to enhance the user ...

Splunk Observability Cloud's AI Assistant in Action Series: Explaining Metrics and ...

This is the fourth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how ...

Brains, Bytes, and Boston: Learn from the Best at .conf25

When you think of Boston, you might picture colonial charm, world-class universities, or even the crack of a ...