Splunk Installation & Provision
4/17/25About 4 minsplunksplunksplunk-installationsplunk-provision
Start Using Splunk
Please sign up a new splunk account if you don't have yet.
- Splunk Cloud Platform Free Trial
- Splunk Enterprise Free Trial
- Universal Forwarder
Forwarding Data into Splunk Cloud Platform - Windows Forwarder
- On the Splunk Cloud Platform search head(login with your username and password), click on Universal Forwarder to download the UF credentials package
- Copy the UF credentials package file (.spl) to the machine from which you intend to forward data, it's used to connect forwarder to Splunk Cloud Instances
- On the same machine, go to Splunk.com and download the universal forwarder and run the installer package (.msi)
- On the Wizard set up screen, accept the license agreement and select âA Splunk Cloud instanceâ
- Click âCustomize Optionsâ and make sure you run the UF as a Local System account, domain account for production environment
- On the Credentials screen, uncheck âGenerate random password.â Manually put in an administration username and password. The Splunk credentials package will need this information
- Skip the Deployment server screen and select âInstallâ on the final screen, this will install the Splunk universal forwarder in
c:\Program Files\Splunkuniversalforwarder\
- Open an elevated command prompt by typing
cmd
into the search bar, right click on âCommand Promptâ and select âRun as administratorâ - Go to the Splunk home directory, in this case you will type
cd Program Files\Splunkuniversalforwarder\bin
- Install the Splunk UF credentials package
splunk.exe install app c:\users\<user name>\downloads\splunkclouduf.spl
- Restart the Splunk forwarder
splunk.exe restart
- Go to the Splunk Cloud Platform "Search & Reporting" page, type
index=*
in the search bar, click on the "Search" button
Forwarding Data into Splunk Enterprise
Forwarding Data into Splunk Linux(Search Head/Indexer)
Installing Splunk Enterprise(Search Head/Indexer) on Linux
- Visit Splunk.com and click on âFree Splunk.â Log in with your account or create a new one
- Click âFree Trials and Downloadsâ
- Under âSplunk Enterpiseâ select âGet my free trialâ
- Select the Linux tab
- Select âcopy wget linkâ for the
.tgz
file - Paste the wget string into your Linux command line, adding sudo before it, e.g.
sudo wget âO âŠ
- Check whether the file was successfully downloaded using the
ls
command - The default Splunk home directory is
/opt/splunk
, so letâs untar the file into the opt directory. We can do this with one commandsudo tar xvzf <splunk_package_name.tgz> -C /opt
- Go to the Splunk home directory
cd /opt/splunk/bin
- Start Splunk for the first time
sudo ./splunk start --accept-license
,--accept-license
is used to accept the license agreement - Create a username and password as prompted
- Wait for the web server to be online, get the IP address of this machine, and visit your Splunk search head web interface at "https://<ip-address>:8000"
Splunk Linux Universal Forwarder
Don't install a forwarder on the same machine as search head or indexer.
- Visit Splunk.com and click on âFree Splunk.â Log in with your account or create a new one
- Click âFree Trials and Downloadsâ
- Under âSplunk universal forwarderâ select âGet my free downloadâ
- Select the Linux tab
- Select âcopy wget linkâ for the
.tgz
file for the correct version of Linux - Create the least privileged user and group(security), both named splunkfwd
sudo useradd âm splunkfwd
, list all groups usinggetent group
- Navigate to
/opt
- Paste the wget string into your Linux command line, adding sudo before it
sudo wget âO âŠ
- Check whether the file was successfully downloaded using the
ls
command - Untar the
.tgz
filesudo tar xvzf <splunk_package_name.tgz>
- Go to the Splunk forwarder home directory:
cd /opt/splunkforwarder
- Give the least privileged user and group access to the Splunk home directory
sudo chown âR splunkfwd:splunkfwd /opt/splunkforwarder
- Start Splunk for the first time
- Move to the
/bin
directory (cd /bin
) sudo ./splunk start --accept-license
- Move to the
- Create a username and password as prompted
- Configure receiving on the search head(Splunk Enterprise instance - search head & indexer combo ), in a distributed environment, you would do this on the indexer
- Settings -> Forwarding and receiving -> Configure receiving -> New receiving port
- Enter the default port of 9997
- Restart the search head: Settings -> Server Controls -> Restart Splunk
- Stop the forwarder
sudo ./splunk stop
- Run the boot-start script
sudo ./splunk enable boot-start
- Add the indexer/search head as the target
sudo ./splunk add forward-server <ip address>:<port>
, check the forwarder server by typingsudo ./splunk list foward-server
- Add a data monitor to forward
sudo ./splunk add monitor /var/log
- Go back to the Splunk search head/indexer -> Searching & Reporting(app) -> type
index=*
in the search bar
Forwarding Data into Splunk Windows(Search Head/Indexer)
Splunk Windows Universal Forwarder
Installing Splunk Enterprise(Search Head/Indexer) on Windows is skipped as it's very easy to setup using the wizard installer.
- Set up receiving on the search head/indexer: Settings -> Forwarding and receiving -> Configure receiving -> New receiving port -> 9997
- Open port 9997 for incoming traffic on the Windows firewall
- Search âfirewallâ and click on Windows Defender Firewall
- Select Advanced settings
- Select Inbound Rules
- Select New Rule
- Select Port -> Next
- Select TCP -> Specific local ports: 9997 -> Next
- Select Allow the connection -> Next
- Select all: Domain, Private, Public -> Next
- Name the firewall rule -> Finish
- Restart the Splunk search head/indexer, Settings -> Server controls -> Restart Splunk
- On the Windows machine from which you intend to forward data, go to Splunk.com and log in
- Click Free Trials and Downloads
- Scroll down to Universal Forwarder
- Select Get My Free Download, On the Windows tab, select Download Now for your version of Windows (I will not be using wget for Windows)
- Run the .msi installer
- In the installation wizard, check the box to accept the license agreement, select âAn on-premises Splunk Enterprise instanceâ and click âCustomize Optionsâ
- Skip the default directory and SSL certificate screens
- Select Local System (the default is âVirtual Account,â but for this class we will run it as Local System) -> Next
- Check at least one box under Windows Event Logs (I checked them all) -> Next
- Create a username and password
- Skip the Deployment Server screen -> Next
- Type in the IP address and port of the search head/indexer
- Click Install, then Finish
- Go back to the Splunk search head/indexer -> Searching & Reporting(app) -> type
index=*
in the search bar