Getting Data In

How to ingest only a specific file type within a tar.gz?

thisissplunk
Builder

I've got a ton of tar.gz's to ingest. Each one has three files in it, with one "results.txt" file that actually needs to be ingested. Can I/How do I tell Splunk to read those archives but only ingest the "results.txt" csv file within it?

I have a feeling I'll need to decompress everything and add the parent file name or something onto reach "results.txt" but I'm trying really hard to avoid that.

I understand inputs.conf, but I'm pretty sure I can only point Splunk to ingest the tar.gz files, not the files within the archives.

0 Karma

bcyates
Communicator

You can set a whitelist in your input stanza to only include files that read "results.txt" in the file name but if it's just one csv that you're interested in, it may be easier to untar and just upload the csv as a lookup table

0 Karma
Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Shape the Future of Splunk: Join the Product Research Lab!

Join the Splunk Product Research Lab and connect with us in the Slack channel #product-research-lab to get ...

Auto-Injector for Everything Else: Making OpenTelemetry Truly Universal

You might have seen Splunk’s recent announcement about donating the OpenTelemetry Injector to the ...