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!

Stay Connected: Your Guide to July Tech Talks, Office Hours, and Webinars!

What are Community Office Hours?Community Office Hours is an interactive 60-minute Zoom series where ...

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 ...