When forwarding events from endpoints a common method is to utilize a Splunk Universal Forwarder agent. This agent is installed locally and is configured to monitor log files or directories for changes.
Before You Start
The main Splunk infrastructure servers are located in AWS. The servers where the agent is installed will need to have access to the internet. If this is not possible or easy to accommodate, please contact the Splunk Service Admin – splunk-support@illinois.edu – for an alternative internal deployment-server address and appropriate whitelist settings.
Installing the agent to our knowledge has been non-disruptive, however we recommend that you test on a test machine before making any changes to production systems.
You may want to also consult any change control process before making any changes to production systems.
LINUX – Installation
There are as many ways to install an application as there are flavors of Linux, so this section will provide an overview of installing a Splunk Universal Forwarder via a tar-ball file. The step-by-step instructions will be specific to CentOS 7/8, so please adapt your strategy accordingly!
Here is a link to the Splunk documenation for installing a Universal Forwarder on Linux:
https://docs.splunk.com/Documentation/Forwarder/8.2.1/Forwarder/Installanixuniversalforwarder
1) The recommendation from both Splunk and the Illinois Splunk team is that you run Splunk as a non-root user. You can use an existing user, however this user will need to be able to read the files and directories that you will want to monitor, it will require access to write to the Universal Forwarder’s directory and execute scripts there, and also bind to network ports that it is listening on. Therefore it is the Illinois Splunk team’s reccomendation that a dedicated user and group are created, named “splunk”. If this is not possible, skip this step and work with the group that manages your infrastructure to ensure the user you do user can accomplish the tasks above.
# as rootuseradd splunkgroupadd splunk #(may not be necessary)2) Download the Universal Forwarder tarball from our Splunk Versions and Locations page to a temporary location. The current version will be the most recent and stable release, and the latest version will be the the most recent release. This step will use wget, so please make sure that it is installed on your system prior to this step (in CentOS use $ sudo yum install wget).
# as rootwget -O /tmp/splunkforwarder.tgz https://go.illinois.edu/splunk-uf-linux-current3) The recommendation from Splunk is to install the Universal Forwarder in /opt, however this can be changed based on your own system’s configuration. Un-tar the file you just downloaded, either by using the -C flag or by navigating to the directory you want to install.
# as roottar -xvf /tmp/splunkforwarder.tgz -C /opt # ORcd /opttar -xvf /tmp/splunkforwarder.tgz4) Currently the folder /opt/splunkforwarder and its contents are owned by root (or whatever user you used to install), so change ownership to the user that will be running Splunk.
# as rootchown -R splunk:splunk /opt/splunkforwarder5) If you are not planning on leveraging the power of the Splunk Deployment server to help you manage apps and connections to Splunk Cloud, skip this step at your own risk! If you do plan on utilizing the Deployment server, you will want to make sure that this app is in place before you start Splunk for the first time. Here you will use wget to get the default Deployment Server app, and then un-tar the .spl file in the appropriate folder. Before moving on to the next step, make sure that directory and file ownership are correct.
# as rootwget -O /tmp/default-deployment-server.spl https://go.illinois.edu/default-deployment-servertar xvf /tmp/default-deployment-server.spl -C /opt/splunkforwarder/etc/appsrm /tmp/default-deployment-server.spl6) As the user that owns /opt/splunkforwarder, its finally time start Splunk, accept the license, create a local administrative user & password
# as splunk/opt/splunkforwarder/bin/splunk start # HELPFUL FLAGS # --accept-license : Automatically accepts the license that will appear at first boot after install or upgrade # --answer-yes --no-prompt : Answer the default YES to any questions # --seed-passwd <YOUR PASSWORD HERE> : The user will default to "admin" and you supply the password at the command line # WHICH COMBINES TO/opt/splunkforwarder/bin/splunk start --accept-license --answer-yes --no-prompt --seed-passwd <PASSWORD!>7) Finally you will need to enable Splunk to start running at boot time. While there are a number of ways to do this, the method prefered by Splunk has either root or another user that can sudo run the following command
# as root/opt/splunkforwarder/bin/splunk enable boot-start -user splunk # OR# as splunk$ sudo /opt/splunkforwarder/bin/splunk enable boot-start -user splunkCongrats! You have successfully installed the Splunk Universal Forwarder! Contact splunk-admin@illinois.edu for next steps.
LINUX – Upgrading
The process for upgrading on Linux is straight forward, and we will continue with our CentOS 7/8 example above.
1) Download the Universal Forwarder tarball from our Splunk Versions and Locations page to a temporary location, and for this example we will wget the “latest” version of the Universal Forwarder available on our wiki page.
# as rootwget -O /tmp/splunkforwarder.tgz https://go.illinois.edu/splunk-uf-linux-latest2) Stop Splunk
# as splunk/opt/splunkforwarder/bin/splunk stop3) Un-tar the file you just downloaded, either by using the -C flag or by navigating to the directory you want to install.
# as roottar -xvf /tmp/splunkforwarder.tgz -C /opt # ORcd /opttar -xvf /tmp/splunkforwarder.tgz
4) Currently the folder /opt/splunkforwarder and its contents are owned by root (or whatever user you used to install), so change ownership to the user that will be running Splunk.# as rootchown -R splunk:splunk /opt/splunkforwarder5) Start Splunk, if you wish to review the license remove the flags
# as splunk/opt/splunkforwarder/bin/splunk start --accept-license --answer-yesCongrats! You have successfully updated the Splunk Universal Forwarder!
WINDOWS
- Download the Universal Forwarder Windows MSI from the Splunk Versions and Locations Wiki page. Consult with the Splunk Administrator as to either the current or latest version is appropriate for your setup.
- Run the executable as a user that has Administrator rights

- Check the License Agreement box
- GOTCHA #1 >You will need to make sure to select the “An on-premise Splunk Enterprise instance” option due to our hybrid configuration.
- Click Customize Options

- The default installation directory, C:Program FilesSplunkUniversalForwarder is preferred, however you are free to install anywhere. Once the preferred location is selected, click Next

- SSL Certificates will be provided once the installation process is complete, so for this step click Next

- Local System accounts are preferred unless you have a non-user service account to specifically run this as. If you use a Domain Account you will need to make sure you have permissions to the files/eventlogs that will be collected from the machine. Prefix the domain account name with uofiusername to properly create the service. We are still investigating Virtual Account as an option, so for now the typical installation uses the default, so click Next

- GOTCHA #2 > Input settings will be managed by a local admin, and some can be setup by Splunk admin team via the deployment server. The Windows Event Logs will be best processed by having the Splunk Add-on for Microsoft Windows installed along with your UF, and by selecting anything in this menu input configurations may be placed in un-ideal locations which may lead to .conf conflicts further down the road. Leave all the checkboxes unmarked and click Next

- Create a Username and Password that will be used to manage the Splunk application on your host. This user/password pair is only used locally, and you will need to provide them in step 17. Please save these values in a password manager as you will need to supply them once in a blue moon and you will never remember them. Once done click Next

- Deployment Server settings should remain blank for this step. We will be setting up that connectivity to the Illinois Deployment Server in a later step. For now leave blank and click Next

- Receiving Indexer settings should remain blank. A bundle of forwarding settings and certificates will be pushed from the Deployment Server. For now leave blank and click Next

- You will receive a warning that we left the previous two settings blank. We are fine with this, so click OK


- Click Install, watch the bar fill up, then click Finish
- Download the Deployment Server configuration bundle from https://go.illinois.edu/default-deployment-server
- Open a command prompt window & navigate to the bin directory of the SplunkUniversalForwarder. For example
>cdC:\Program Files\SplunkUniversalForwarder\bin\ - Run the following commands using the Username & Password you created in step 10 to load the default-deployment-server app and restart
> .\splunk.exe install app <full path todefault-deployment-server.spl> -auth <username>:<password>> .\splunk.exe restartAUDIBLE!
Note, you can also extract the .spl bundle using a tool like 7-Zip and then copy the files to the C:Program FilesSplunkUniversalForwarderetcapps folder.
- Installation is complete! Time to configure inputs.
Mac OSX
- Download the current supported Universal Forward agent from here – https://go.illinois.edu/splunk-uf-mac-os10-current
- Launch the .dmg file and Install Splunk Universal Forwarder
- The Installation window will launch and walk you through getting Splunk installed. Accept the License Agreement, select the location you want to install, and click Install.
- During the installation process you will be prompted to create a local administrative user and password. KEEP THESE SOMEPLACE SAFE! They are not recoverable and you will have to uninstall & reinstall Splunk if you forget them
- Installation is then completed.
- Once done, you can start Splunk for the first time a few ways:
- At the terminal run
/Applications/SplunkForwarder/bin/splunkstart- NOTE the default directory to install Splunk to is different than what the Installer states on the Summary page.
- A window will pop-up after the install process Called Splunk’s Little Helper, clicking Start Splunk is the same as running it from the terminal
- At the terminal run
- Download our Default Deployoment Server configuration from https://go.illinois.edu/default-deployment-server
- If you installed Splunk and downloaded the configuration to the default directories, use the following command at terminal to configure the Universal Forwarder to communicate with the Deployment Server
/Applications/SplunkForwarder/bin/splunkinstallapp ~/Downloads/9-DEFAULT-splunk-deployment.spl -auth [admin you just created]:[passwordforadmin]
- Time to configure inputs.
Depending on the local security settings there may be a few “gotchas!” with the installation. One such instance is when attempting to launch the installation, where it will block you from opening the file because its not an identified developer. Go to System Preferences > Security & Privacy and the blocked application should be shown below, click Open Anyway to continue.

# tar -xvf /tmp/splunkforwarder.tgz -C /opt
or
# cd /opt
# tar -xvf /tmp/splunkforwarder.tgz
