Deployment Architecture

pass username and password while search head cluster restart

Path Finder

We are using a Search Head cluster
Splunk Enterprise

When the CPU and Memory of servers goes high we restart the cluster and the cluster comes back to normal.

I wrote a shell script with 2 lines.

sudo -u splunk /opt/splunk/bin/splunk rolling-restart shcluster-members

when the alert in SH is triggered it is failing as splunk username and passwd needs to be passed to the script manually.

Is there any way I can pass username and password for Splunk in the script to get triggered as per alert.

0 Karma



Please try /opt/splunk/bin/splunk rolling-restart shcluster-members -auth 'username:password' , however hard-coded admin username and password in not good practice from security point of view.

0 Karma
Get Updates on the Splunk Community!

Maximize the Value from Microsoft Defender with Splunk

 Watch NowJoin Splunk and Sens Consulting for this Security Edition Tech TalkWho should attend:  Security ...

This Week's Community Digest - Splunk Community Happenings [6.27.22]

Get the latest news and updates from the Splunk Community here! News From Splunk Answers ✍️ Splunk Answers is ...

Reminder! Splunk Love Promo: $25 Visa Gift Card for Your Honest SOAR Review With ...

We recently launched our first Splunk Love Special, and it's gone phenomenally well, so we're doing it again, ...