Splunk indexer
Installation
- Get the Debian package from
http://www.splunk.com/download?ac=get_splunk_download
- Install it with a root user
dpkg -i splunk_package_name.deb
|
- Start the server
/opt/splunk/bin/splunk start --accept-license
|
Launch the web application
In an internet browser, access the Splunk web-application at
http://<hostname>:<port>
<hostname> is the host server name or IP.
<port> is the port you specified during the installation (the default port is 8000)
The web prompts you the login page (default username
"admin" and password "
changeme"), after that you need to change the admin password.
Configuration
Add local data
- Go to "Manager » Data inputs » Files & directories"
- Click on "New" button
- Choose the log file and follow the wizard
Receive data
- Go to "Manager » Forwarding and receiving » Receive data"
- Click on "New" button
- Choose the server port (where the indexer will receive the logs from the forwarders)
- Restart Splunk server
Note: contact HelpDesk to open the ports between the indexer and forwarders.
Splunk forwarder
Installation
- Get the Debian package from
http://www.splunk.com/download/universalforwarder
- Install it with a root user
dpkg -i splunk_package_name.deb
|
- Start it
/opt/splunkforwarder/bin/splunk start --accept-license
|
Configuration
- Configure universal forwarder to auto-start
/opt/splunkforwarder/bin/splunk enable boot-start
|
- Configure the universal forwarder to forward the log files to a specific receiver indexer
/opt/splunkforwarder/bin/splunk add forward-server <host>:<port> -auth <username>:<local-password>
|
Where:
<host> is the receiving indexer's hostname or IP address and <port>
is the port it's listening on. By convention, the receiver listens for
forwarders on port 9997, but it can be set to listen on any port, so
you'll need to check with the receiver's administrator to obtain the
port number. For information on setting up a receiver, see "Enable a receiver".
<username>:<password> is the username and password for logging into the Splunk forwarder. By default, these are "admin:changeme"
(To set a different password than the default , issue the following
command "splunk edit user admin -password <new password> -role
admin -auth admin:changeme").
- Add the data to be forwarder
- Edit "inputs.conf"
cd /opt/splunkforwarder/etc/system/local/
nano inputs.conf
|
- Include the content below
[monitor:
disabled = false
ignoreOlderThan = 3d
sourcetype = <project-name>
|
Where:
ignoreOlderThan: the input monitor stop checking files for updates if the time passed the 3 days.
- Restart the Splunk forwarder
/opt/splunkforwarder/bin/splunk restart
|
- Check the Splunk log file
less /opt/splunkforwarder/var/log/splunk/splunkd.log
Note: to see more configuration options, check it here -> http://docs.splunk.com/Documentation/Splunk/5.0.3/Data/Editinputs.conf
No comments:
Post a Comment