Deployment Architecture

How to add forward server in non-interactive mode

pshangguan
New Member

I want to use Ansible or script to install Splunk on Linux servers. When I issue "splunk add forward-server server_ip:port", it prompts me to enter "y" to finish.

How I can run this command in non-interactive mode?

Thanks,
Philip

Tags (1)
0 Karma
1 Solution

esix_splunk
Splunk Employee
Splunk Employee

Im not sure if this is different between a UF and a HF, but HF asks you to login in order to make these changes. Pretty sure the UF does also, but could be wrong...

In newer versions, you should be able to add the --answer-yes flag from the command line. I havent tried this, so you can validate and post the results here.

Thanks

View solution in original post

0 Karma

sravankaripe
Communicator

splunk add forward-server server_ip:port --answer-yes

0 Karma

esix_splunk
Splunk Employee
Splunk Employee

Im not sure if this is different between a UF and a HF, but HF asks you to login in order to make these changes. Pretty sure the UF does also, but could be wrong...

In newer versions, you should be able to add the --answer-yes flag from the command line. I havent tried this, so you can validate and post the results here.

Thanks

0 Karma

pshangguan
New Member

The --answer-yes worked for my script. Thanks!!!

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...