Splunk Search

Extract field from table data which present on _raw

sathim471
Engager

Hi All,

I have below table type data in _raw and i want to extract fields.

Example _raw as below

Name       ID         Age

Harry        AAA     23

Will           BBB       27

Brian        CCC      30

 

Expectation is  like below. I want 3 fields (as no.of columns) and it should list like below. 

if i do (...|table Name,ID,Age) it should show like below

Name ID Age

Harry AAA 23

Will BBB 27

Brian CCC 30

Thanks in advance

Labels (4)

to4kawa
Ultra Champion
index=_internal | head 1 | fields _raw | eval _raw="Name       ID         Age
Harry        AAA     23
Will           BBB       27
Brian        CCC      30"
| rename COMMENT as "these are your log sample. from here, the logic"
| rex mode=sed "s/[ ]+/,/g"
| multikv
| rename COMMENT as "as you like | table Name,ID,Age"

inventsekar
SplunkTrust
SplunkTrust

Hi @sathim471 .. these logs are already ingested or not yet? if they are ingested already, what is your current search query? the fields may be already extracted.. 

if so, ..lets say, for example:

index=main source=testSource | table Name ID Age

if fields are not extracted, then, you have to use "rex" (regular expressions)command to extract them. provide us some sample events, so that we can help you with rex query.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...