Getting Data In

How to export real raw events from Splunk?

orion44
Communicator

Other answers imply that | table _raw | outputcsv is the method to export raw events from Splunk. However a csv file is not raw events as it, by design, is structured data.

I can export real raw events from the GUI via Search > Export > Format: Raw Events > Done.

How can this be done programmatically?

Tags (1)
0 Karma
1 Solution

orion44
Communicator

Solution: Use Splunk CLI to export the raw data.

splunk search "index=data earliest=-1h@h latest=@h" -output rawdata -maxout 200000 > "F:\Splunk Export\raw.txt"

View solution in original post

orion44
Communicator

Solution: Use Splunk CLI to export the raw data.

splunk search "index=data earliest=-1h@h latest=@h" -output rawdata -maxout 200000 > "F:\Splunk Export\raw.txt"

chrisyounger
SplunkTrust
SplunkTrust

I would argue that a CSV file with only one column in it (_raw) is not really structured data, becuase it doesn't even have any commas in it (unless they are in the raw data)...

I think this would be your best option.

0 Karma
Get Updates on the Splunk Community!

Exporting Splunk Apps

Join us on Monday, October 21 at 11 am PT | 2 pm ET!With the app export functionality, app developers and ...

Cisco Use Cases, ITSI Best Practices, and More New Articles from Splunk Lantern

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Build Your First SPL2 App!

Watch the recording now!.Do you want to SPL™, too? SPL2, Splunk's next-generation data search and preparation ...