Getting Data In

How to split String sentence into one row?

tahasefiani
Explorer

Hello,

I have a fields in my index named MESSAGE.

[BBB] ProcessGenererIdentifiantLMKRImpl/genererIdentifiantLMKR - CHECK OK - codeClient= 98451635- codeCanal= III- identifiantLMKR= JHF7UNJK6ZJNEZFI0873NFI373UBF389, nomMethode=genererIdentifiantLMKR

The result that i want is

alt text

0 Karma
1 Solution

to4kawa
Ultra Champion
| makeresults 
| eval message="[BBB] ProcessGenererIdentifiantLMKRImpl/genererIdentifiantLMKR - CHECK OK - codeClient= 98451635- codeCanal= III- identifiantLMKR= JHF7UNJK6ZJNEZFI0873NFI373UBF389, nomMethode=genererIdentifiantLMKR"
| eval _raw=split(replace(replace(message," ",""),",","-"),"-")
| kv
| table codeClient identifiantLMKR

View solution in original post

kamlesh_vaghela
SplunkTrust
SplunkTrust

@tahasefiani

Can you please try this?

YOUR_SEARCH | rex field=MESSAGE "codeClient=\s(?<codeClient>\d+[^-]).*identifiantLMKR=\s(?<identifiantLMKR>\w+)"  
| table codeClient identifiantLMKR

Sample search:

| makeresults 
| eval MESSAGE="[BBB] ProcessGenererIdentifiantLMKRImpl/genererIdentifiantLMKR - CHECK OK - codeClient= 98451635- codeCanal= III- identifiantLMKR= JHF7UNJK6ZJNEZFI0873NFI373UBF389, nomMethode=genererIdentifiantLMKR" 
| rex field=MESSAGE "codeClient=\s(?<codeClient>\d+[^-]).*identifiantLMKR=\s(?<identifiantLMKR>\w+)"  
| table codeClient identifiantLMKR
0 Karma

tahasefiani
Explorer

it returns me empty columns

0 Karma

to4kawa
Ultra Champion
| makeresults 
| eval message="[BBB] ProcessGenererIdentifiantLMKRImpl/genererIdentifiantLMKR - CHECK OK - codeClient= 98451635- codeCanal= III- identifiantLMKR= JHF7UNJK6ZJNEZFI0873NFI373UBF389, nomMethode=genererIdentifiantLMKR"
| eval _raw=split(replace(replace(message," ",""),",","-"),"-")
| kv
| table codeClient identifiantLMKR
Get Updates on the Splunk Community!

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

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...