Splunk Search

Creating fields based on a comma seperated list of values

sourabhguha
Explorer

Hi,

I am indexing a set of csv files. the files do not have the header fields in it.

While I am creating the sourcetype, I would like to specify the following fields name for the sourcetype - which is a comma separated list. How can i do that?

tenant,MGId,HostGroup,TotalVMsPerHG,TotalpCoreForHG,UsedpCoreForHG,FreepCoreForHG,CoreAvailabilityPercentForHG,

Tags (1)
0 Karma
1 Solution

Ayn
Legend

Setup a delimiter based field extraction in props.conf / transforms.conf.

In props.conf, you put something like:

[yoursourcetype]
REPORT = getcsvfields

And in transforms.conf:

[getcsvfields]
DELIMS = ","
FIELDS = tenant,MGId,HostGroup,TotalVMsPerHG,TotalpCoreForHG,UsedpCoreForHG,FreepCoreForHG,CoreAvailabilityPercentForHG

View solution in original post

Ayn
Legend

Setup a delimiter based field extraction in props.conf / transforms.conf.

In props.conf, you put something like:

[yoursourcetype]
REPORT = getcsvfields

And in transforms.conf:

[getcsvfields]
DELIMS = ","
FIELDS = tenant,MGId,HostGroup,TotalVMsPerHG,TotalpCoreForHG,UsedpCoreForHG,FreepCoreForHG,CoreAvailabilityPercentForHG
Get Updates on the Splunk Community!

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

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...