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
SplunkTrust
SplunkTrust

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
SplunkTrust
SplunkTrust

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
SplunkTrust
SplunkTrust

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
Champion

@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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...