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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...