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!

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