All Apps and Add-ons

View files being indexed

Jack
Engager

can I view an entire raw log file from within Splunk? For example, if I'm monitoring an apache log4j file (server.log) on a remote machine, and I want to view that entire raw data on my splunk instance, can I do that?

1 Solution

gkanapathy
Splunk Employee
Splunk Employee

You could just look for source=myfilepath host=myhostserver (and set the time range for the parts of the file you want to see if necessary).

View solution in original post

jrodman
Splunk Employee
Splunk Employee

whether you just want the search (as gkpanathy suggests) or the more elaborate methods that Chris R is on about comes down to this:

Do you need to see the events, or do you need to see everything together, in the order it appears in the file.

The search view gives you all the data, it just presents it in the splunk ui. eg,


  splunk> source=/var/log/something-or-other.log host=jrodman.example.com 

If you really need to see the file ressembled as it was before, it gets fairly tricky with rolling logfiles to pin down exactly what you need. Perhaps the use case will clarify?

0 Karma

gkanapathy
Splunk Employee
Splunk Employee

You could just look for source=myfilepath host=myhostserver (and set the time range for the parts of the file you want to see if necessary).

Chris_R_
Splunk Employee
Splunk Employee

There isnt an easy way to view full raw events within splunk. You can view the raw event data on the left of the event data dropdown "Show Source"

To view an entire log data you would have to use a splunk cmd tool like export
./splunk export eventdata -source -dir /home/datadir

./splunk help export for full params

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...