Manual data input
There are several ways to send data to Splunk, which will be covered in more detail in upcoming posts. Here we will show how to manually input the sample logs used here on the blog.
On its website, Splunk provides the logs of a fictitious online store called Buttercup Games, updated daily and in text format. These files can be found here. After downloading them, open the Splunk server in your browser, go to Settings and then to Add Data.

On the page that opens, choose the Upload option.

Find the “Select Source” option, browse to the folder where the file was downloaded and select it. In our example we will use a web service log, found in the file access.

You can also drag the file and drop it directly onto the page.
The next step is to set the Source Type, which, in short, is the set of rules Splunk uses to understand the information in each part of a log. Splunk usually tries to apply the most suitable Source Type on its own, but if it doesn't, you can select one as shown in the image below.

Next, you can set a fixed name for the host. By default Splunk uses the name of the host where the upload is being made, but you can change it manually. You also need to assign an index to receive the data. The default index is main, which receives the data if no index is chosen. If you like, you can create a new index and select it from the list.

Once these steps are done, you will be taken to a review screen, and right after that you can start searching your log.

You will be taken to the screen below, with a search already filled in that returns your log data. Each log line becomes an event, and the fields extracted based on the Source Type chosen earlier appear in the left column.

We will use the web index in most of the examples here on the blog, but this manual input method can be used for any file on your machine. I even recommend using these steps to validate and understand the content of any log before putting it into production.
There are other ways to send data to Splunk, such as agent-based collection (Universal Forwarder) and syslog.
Want to practice? Try the free We Challenge sample, with Splunk questions and explanations.
To start from scratch, see the Introduction to Splunk course on Udemy (in Portuguese). For your team, see WeValuate's Splunk training.
Questions about the post? Content suggestions? Corrections? Criticism or praise?
Please contact us at wevaluatebr@gmail.com and we will reply as soon as possible.
If you liked it, share this post on your social networks and help us spread the word!
Comments