Configuration
This is a step-by-step guide on configuring the Splunk Universal Forwarder on a Linux machine to forward logs.
Configuring Splunk Universal Forwarder on a Linux Machine
To configure the Universal Forwarder to forward logs from Cloud Suite Syslog to Splunk over a secure connection, follow these steps:
-
Enable Splunk Forwarder:
-
Open a terminal on your Linux machine.
-
Navigate to the Splunk forwarder directory by running the following command:
cd /opt/splunkforwarder/bin
-
Accept the license agreement and start the Splunk service:
sudo ./splunk start --accept-license
-
To enable Splunk to start automatically when the system boots, run the following command:
sudo ./splunk enable boot-start
-
-
Forward data to the Splunk server by running the following command to add the Splunk indexer or receiver details:
-
Monitor the /var/log/messages file (the default syslog file for RHEL) by running the following command:
-
After adding the input, run the following command to restart the Splunk Universal Forwarder to apply the changes:
sudo ./splunk add forward-server <indexer-host>:<port>
Replace <indexer-host> with the IP or hostname of your Splunk server, and <port> with the port used for receiving data (default: 9997).
sudo ./splunk add monitor /var/log/messages
This is the messages file (RHEL syslog log location)
sudo . /splunk restart