0

I wish to create a script for setting up forwarding to a splunk server. Here's what I have so far:

./splunk add forward-server SPLUNK-IP-ADDRESS:SPLUNK-PORT

However, it asks for my credentials. How can I non-interactively pass credentials to splunk and setup the forwarder?

1

You can use the splunk login command to pass your credentials to the Splunk server:

./splunk login -auth 'admin:mypassword'
./splunk add forward-server SPLUNK-IP-ADDRESS:SPLUNK-PORT 
1
  • of course - doing this means the username and password are in your command history – warren Sep 10 '20 at 16:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.