Installation

I am trying to script the installation and startup of splunkforwarder.

jgonza1
New Member

I am trying to automated the installation and startup of splunkforwarder but when I startup splunkforwarder for the first time it asks a question "Do you agree with this license? [y/n]:" I want the script to pass in a y to the question and continue to startup the splunk processes. I have try scripting this with expect script below but it does not startup splunk. I have done this before with other softwares client software without any problem but with this splunk startup it does not work. I have tried other ways put nothing seems to work very annoying.

more splk.exp

!/usr/bin/expect

spawn /opt/splunkforwarder/bin/splunk start
expect -exact "Do you agree with this license? [y/n]: "
send -- " "
send -- "y\r"
expect -exact "Do you agree with this license? [y/n]: "
send -- "y\r"
expect eof

./splk.exp

spawn /opt/splunkforwarder/bin/splunk start
SPLUNK SOFTWARE LICENSE AGREEMENT

THIS SPLUNK SOFTWARE LICENSE AGREEMENT (THE "AGREEMENT") GOVERNS ALL SOFTWARE
PROVIDED BY SPLUNK INC. ("SPLUNK") INCLUDING FREE SPLUNK SOFTWARE ("FREE
SOFTWARE") AND SOFTWARE PURCHASED THROUGH SPLUNK'S ONLINE STORE OR OTHER
CHANNELS ("PURCHASED SOFTWARE"), COLLECTIVELY THE SPLUNK SOFTWARE ("SOFTWARE")
AND ANY AND ALL UPDATES, UPGRADES, AND MODIFICATIONS THERETO. CONFIRMATION OF
YOUR ORDERS ("ORDER CONFIRMATION") WILL BE DEEMED INCORPORATED INTO AND MADE
PART OF THIS AGREEMENT.

YOU WILL BE REQUIRED TO INDICATE YOUR AGREEMENT TO THESE TERMS AND CONDITIONS
IN ORDER TO DOWNLOAD THE SOFTWARE AND REGISTER WITH SPLUNK IN ORDER TO OBTAIN
LICENSE KEYS NECESSARY TO COMPLETE THE INSTALLATION PROCESS FOR PURCHASED
SOFTWARE. BY CLICKING ON THE "YES" BUTTON, DOWNLOADING OR INSTALLING THE
SOFTWARE, OR USING ANY MEDIA THAT CONTAINS THE SOFTWARE, YOU ARE CONSENTING
TO BE BOUND BY THIS AGREEMENT.

IF YOU AGREE TO THESE TERMS ON BEHALF OF A BUSINESS, YOU REPRESENT AND WARRANT
THAT YOU HAVE AUTHORITY TO BIND THAT BUSINESS TO THIS AGREEMENT, AND YOUR
AGREEMENT TO THESE TERMS WILL BE TREATED AS THE AGREEMENT OF THE BUSINESS.
IN THAT EVENT, "YOU" AND "YOUR" REFER HEREIN TO THAT BUSINESS.

"Splunk Developer API" means the documentation and functionality enabling
the creation of extensions to the Software. "Example Modules" means the
source code and binary form of examples that use the Splunk Developer
API.

PURCHASED SOFTWARE TERM. Unless earlier terminated, this Agreement will be
in effect perpetually for any Purchased Software. "Term" means the period in
which the Agreement is in effect.

PURCHASED SOFTWARE FREE TRIAL. Notwithstanding the foregoing, if the
applicable Order Confirmation is limited to a free trial license, then
the Term will be limited to the free trial period specified in the Order
Confirmation, this Agreement and any license rights granted hereunder will
automatically terminate at the end of the free trial period, and there
will be no Renewal Term. Any license keys provided for a free trial will
automatically expire and may cause the Software to become non-operational
at the end of the free trial period. Provisions in this Agreement regarding
License Fees, Maintenance and Support, and Warranty will not apply to free
trials.

PURCHASED SOFTWARE LICENSE. Subject to your compliance with the terms and
conditions of this Agreement, including your payment of the license fees set
forth in each Order Confirmation (the "License Fees"), Splunk grants you a
nonexclusive, nontransferable, revocable, limited license during the Term
to use the Software for which you have paid the applicable License Fees as
set forth in your Order Confirmation(s), only for your internal business
purposes (which shall include use by consultants, accountants, auditors
and attorneys hired to perform services for you) and only subject to the
following conditions: you may use each Splunk Server with an Enterprise
license to index no more than the peak daily volume of uncompressed data
for which you have paid the applicable License Fees as set forth in your
Order Confirmation (the "Maximum Peak Daily Volume"). The Software will be
configured to display warnings and/or cease indexing data when the Maximum
Peak Daily Volume is reached.

FREE SOFTWARE LICENSE. Subject to the terms and conditions of this Agreement,
Splunk grants to You a non-exclusive, worldwide, fully-paid up copyright
license to use the Free Splunk Software in binary form only and only
--More--(18%)# ps -ef |grep -i splunk
root 29119 28604 0 12:13 pts/0 00:00:00 grep -i splunk
[root@ct-eng-fpats02-devint tmp]#

Tags (1)
0 Karma

Takajian
Builder

I think we can do silent installation of Universal forwarder. The installation command can be executed like as bellow.

msiexec.exe /i splunkuniversalforwarder_x86.msi DEPLOYMENT_SERVER="deploymentserver1:8089" AGREETOLICENSE=Yes /quiet

You can also refer to more detail on the manual as bellow. Hope this help.

http://docs.splunk.com/Documentation/Splunk/5.0/Deploy/DeployaWindowsdfviathecommandline

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...