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 am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...