Starter guide on how to use Splunk to analyze and create reports from server logs.
- Install Docker on your machine from https://www.docker.com/get-started
- Pull splunk container:
docker pull splunk/splunk
- Docker Command:
docker run -e SPLUNK_START_ARGS=--accept-license -e SPLUNK_PASSWORD=password -p 8000:8000 splunk/splunk - Ensure docker container is running:
docker ps - Login to the splunk portal with username 'admin' and the password you provided. The Splunk portal will be found at http://ip_of_your_system:8000
- Go to the Home app by clicking the Splunk logo in the upper left hand of the interface.
- Click the Add Data icon. Then click the upload button.
- You will be taken to the Select Source step. Click the Select Filebutton and choose the access_log.logfile supplied from the logs folder in this repo.
- Splunk should automatically set the source type correctly as 'access_combined_wcookie' for this file. Press next.
- Enter web_application as the Host field value. Press next.
- Press Review and then finish. Press add more data to add the rest of the logs, repeating this process.
- Table below shows the values I used for each log when uploading the data:
| Filename | Source Type | Host Field Value |
|---|---|---|
| access_log.log | access_combined_wcookie | web_application |
| linux_secure.log | linux_secure | web_server |
| db_audit.csv | csv | database |
Here is a sample of queries used on this dataset to generate reports of failed ssh logins on port 22 on the web server


