Splunk Search

Can I extract info from comma deliminated data?

sportauthority
New Member

We are reporting events in a CSV format using a comma deliminated structure. Example below:
,playerID04,player01,client002,clip_started,false,active,,237

Essentially this is a list of info sent when an event happens, comprised of:

player ID, player type, client ID, the event type (clip_started), parameter1, parameter2, video ID (237 in this instance).

In the 1st instance it is the video ID that I am after

What I want to produce is a list or table of these video IDs, showing how many times they show, or are associated with the 'clip_started'. The video ID isn't named as such, but it always appears in the same position within the data, ie. after the 8th comma. Is there a way for me to tell splunk that this is a VIDEO-ID, to extract this number in a repeatable way?

To further expand on this, is there a way for em to tell splunk the names of all of these fields, and for splunk to automatically 'name' them as fields that I can then filter and search by.

thanks

0 Karma

linu1988
Champion

Comma delimited file means the CSV files which splunk by default recognizes. Do you have headers on the files? Have you used the inputcsv or inputlookup command to read the content and filter them afterwards?

0 Karma

Ayn
Legend

Yes. Setup a delimiter based field extraction.

In props.conf, you'd do something like

[yoursourcetype]
REPORT-video = videoinfo

And in transforms.conf

[videoinfo]
DELIMS = ","
FIELDS = "player_ID", "player_type", "client_ID", "event_type", "parameter1", "parameter2", "video_ID"
0 Karma

sportauthority
New Member

looking. thanks

0 Karma

Ayn
Legend
0 Karma

sportauthority
New Member

Is it possible to do this from the search area?

0 Karma
Get Updates on the Splunk Community!

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...