Getting Data In

Is there a REST API for putting a Cluster Master into Maintenance mode?

mpham07
Path Finder

I was just curious about this since I couldn't find anything on it in the following page:

https://docs.splunk.com/Documentation/Splunk/8.0.1/RESTREF/RESTcluster

Thanks in advance.

0 Karma
1 Solution

mpham07
Path Finder

Hello all,

I originally wanted to test stuff with curl and ansible for putting the cluster master in maintenance-mode.

So I found a solution with Ansible from github so all credit goes to the link below:

  - name: "Put Splunk cluster into maintenance mode"
    command: /opt/splunk/bin/splunk enable maintenance-mode --answer-yes -auth "admin:vagrant"
    become: true
    become_user: splunk
    become_method: sudo
    changed_when: False
    ignore_errors: True
    no_log: True
    register: splunk_command_output

  - debug: msg="{{ splunk_command_output.stdout }}"

https://github.com/hortonew/VagrantConfigs/blob/master/Splunk/Splunk-Cluster/ansible/roles/splunk_cm...

View solution in original post

0 Karma

mpham07
Path Finder

Hello all,

I originally wanted to test stuff with curl and ansible for putting the cluster master in maintenance-mode.

So I found a solution with Ansible from github so all credit goes to the link below:

  - name: "Put Splunk cluster into maintenance mode"
    command: /opt/splunk/bin/splunk enable maintenance-mode --answer-yes -auth "admin:vagrant"
    become: true
    become_user: splunk
    become_method: sudo
    changed_when: False
    ignore_errors: True
    no_log: True
    register: splunk_command_output

  - debug: msg="{{ splunk_command_output.stdout }}"

https://github.com/hortonew/VagrantConfigs/blob/master/Splunk/Splunk-Cluster/ansible/roles/splunk_cm...

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...