Splunk Search

Extracting data out of fields correctly

abhayneilam
Contributor

Hi,

I have a dataset like this :

field1=XXXX YYYYY-field2=ZZZZZZ:AAAAAA-field3=BBBBBB-field4=CCCCCC DDDDDDDD

Now after importing my data in splunk I am not getting the correct data in the fields

When I did like this :
field1="XXXX YYYYY" field2="ZZZZZZ:AAAAAA" field3="BBBBBB" field4="CCCCCC DDDDDDDD"

Then it worked, but in the raw log manually it is not possible to decorate the data as it is big in size

Can this type of formation can be made before importing the data into SPLUNK ?

Thanks in advance

0 Karma

sbsbb
Builder

I would make a field transformation, with a regex, that seperates the fields by "-"...

I'm not an expert in regex, but you need to search something like that :
(?P[^-]+)-(?P[^-]+)...

0 Karma
Get Updates on the Splunk Community!

Combine Multiline Logs into a Single Event with SOCK - a Guide for Advanced Users

This article is the continuation of the “Combine multiline logs into a single event with SOCK - a step-by-step ...

Everything Community at .conf24!

You may have seen mention of the .conf Community Zone 'round these parts and found yourself wondering what ...

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...