Splunk Search

Index specific columns from CSV file.

email2vamsi
Explorer

Hello Experts,

The CSV file is located on file share and file is having columns 

Hostname, type, IP. 

From these three columns I would like to ingest Hostname and IP columns and ignore Type column. I want to do this to save disk space on splunk indexers.

Please suggest.

Thank you.

 

Labels (1)
0 Karma

scelikok
SplunkTrust
SplunkTrust

Hi @email2vamsi,

You can use INGEST_EVAL on indexers to remove unwanted columns;

props.conf
[your_sourcetype]
INDEXED_EXTRACTIONS = CSV
TRANSFORMS-drop_fields = drop_useless_fields
EXTRACT-removed_columns = [^,]+,(?<type>[^,]+)

transforms.conf
[drop_useless_fields]
INGEST_EVAL = type:=null()

  

If this reply helps you an upvote and "Accept as Solution" is appreciated.
0 Karma
Get Updates on the Splunk Community!

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...