Splunk Search

Human Readable Indexed Logs

Splunkduck09
Explorer

Hi All, I would like to read Splunk indexed log/data using text editor tool (like Notepad, etc.). I understand Splunk indexed logs are compressed and further processed which creates a Splunk only readable format (Not-Human readable) - which works well for searching or other capabilities of Splunk. 

But, wondering if there is way to convert these indexed logs into a human readable format?  

Labels (1)
0 Karma

livehybrid
Super Champion

Hi @Splunkduck09 

You can use the "dump" Splunk command to export from the proprietary Splunk bucket format back in to Plain text using the following example:

Export all events from index "bigdata" to the location "YYYYmmdd/HH/host" at "$SPLUNK_HOME/var/run/splunk/dispatch/<sid>/dump/" directory on local disk with "MyExport" as the prefix of export filenames. Partitioning of the export data is achieved by eval preceding the dump command.

index=bigdata | eval _dstpath=strftime(_time, "%Y%m%d/%H") + "/" + host | dump basefilename=MyExport fields="_time, host, source, sourcetype"

For more info check out https://docs.splunk.com/Documentation/Splunk/9.4.1/SearchReference/Dump

You can also dump the data using the CLI instead of SPL if required - check out https://docs.splunk.com/Documentation/Splunk/9.4.0/Search/Exportdatausingdumpcommand

Once this is done you will be able to open the resulting file in a standard text editor.

🌟 Did this answer help you? If so, please consider:

  • Adding kudos to show it was useful
  • Marking it as the solution if it resolved your issue
  • Commenting if you need any clarification

Your feedback encourages the volunteers in this community to continue contributing

0 Karma

kiran_panchavat
Influencer

@Splunkduck09 

We must follow the outlined process to back up and restore the data. As mentioned, after restoration, you can query the data using the search head. However, it’s not feasible to directly export it into a human-readable format.

https://docs.splunk.com/Documentation/Splunk/9.2.0/Indexer/Backupindexeddata 

https://docs.splunk.com/Documentation/Splunk/9.2.0/Indexer/Restorearchiveddata 

https://docs.splunk.com/Documentation/Splunk/latest/Indexer/HowSplunkstoresindexes 

Did this help? If yes, please consider giving kudos, marking it as the solution, or commenting for clarification — your feedback keeps the community going!

Splunkduck09
Explorer

Hi Kiran,

Thanks for the replying.

Use case:  I would like to backup indexed Splunk logs into a third party backup/restore system say on daily or weekly basis and it is required to be in human readable format. So they can be retrieved anytime in future within the backup/restore system and can be read with a notepad or other similar tool if needed  

Would love to know your thoughts on above? 

0 Karma

kiran_panchavat
Influencer

@Splunkduck09 

The simplest approach is to use Splunk’s search interface. Run a search query for the data you want (e.g., index=your_index), then export the results. In the Splunk Web UI, after running your search, click the "Export" button, choose a format like CSV, JSON, or raw text, and download the file. This will give you the raw event data in a readable format that you can open in a text editor.
 
Did this help? If yes, please consider giving kudos, marking it as the solution, or commenting for clarification — your feedback keeps the community going!

bowesmana
SplunkTrust
SplunkTrust

You can search them and see the raw data in the search window, you can export them as CSV files, but what's your use case? Seems like an odd thing to want to do... 🙂

Splunkduck09
Explorer

Hey bowesmana, 

Thanks for the replying.

Use case:  I would like to backup indexed Splunk logs into a third party backup/restore system say on daily or weekly basis and it is required to be in human readable format. So they can be retrieved anytime in future within the backup/restore system and can be read with a notepad or other similar tool if needed  

Would love to know your thoughts on above? 

0 Karma

livehybrid
Super Champion

Hi @Splunkduck09 

I think if this is the reason then you'd be better taking a feed of the data at ingestion time rather than extracting it out from Splunk.

You could use Ingest Actions to write to S3 or NFS which might be the easiest approach - Check out https://docs.splunk.com/Documentation/Splunk/9.4.1/Data/DataIngest#Create_an_NFS_file_system_destina...

Theres also a lunch & learn video at https://www.youtube.com/watch?v=9W_4ERKTx94 which gives an overview of Ingest Actions which might help you too.

🌟 Did this answer help you? If so, please consider:

  • Adding kudos to show it was useful
  • Marking it as the solution if it resolved your issue
  • Commenting if you need any clarification

Your feedback encourages the volunteers in this community to continue contributing

0 Karma
Get Updates on the Splunk Community!

Updated Data Type Articles, Anniversary Celebrations, and More on Splunk Lantern

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

A Prelude to .conf25: Your Guide to Splunk University

Heading to Boston this September for .conf25? Get a jumpstart by arriving a few days early for Splunk ...

4 Ways the Splunk Community Helps You Prepare for .conf25

.conf25 is right around the corner, and whether you’re a first-time attendee or a seasoned Splunker, the ...
OSZAR »