Splunk Search

Unable to extract from the field

srinivas_gowda
Path Finder

Hello all,

 

I am trying to extract an field from the below event and using the below add extraction, however this extraction is failing to extract the complete event and is breaking in the middle. Can you please help resolve.

 

212685,00004107,00000000,2404,"20220106111738","20220106111739",4,-1,-1,"SYSTEM","","psd240",327312673,"MS932","Server ジョブ(Server:/情報提供基盤/EXA-X6系/汎用集計・フロア取込系/ユニット別フロアマスタテンポラリネット/ユニット別フロアマスタテンポラリ作成:@52X6013)が異常終了しました(status: a, code: 100, host: PSC642, JOBID: 281767)","Error","jp1admin","/HITACHI/JP1/AJS2","JOB","AJSROOT1:/情報提供基盤/EXA-X6系/汎用集計・フロア取込系/ユニット別フロアマスタテンポラリネット/ユニット別フロアマスタテンポラリ作成","JOBNET","Server:/情報提供基盤/EXA-X6系/汎用集計・フロア取込系/ユニット別フロアマスタテンポラリネット","Server:/情報提供基盤/EXA-X6系/汎用集計・フロア取込系/ユニット別フロアマスタテンポラリネット/ユニット別フロアマスタテンポラリ作成","END","20220106111731","20220106111738","100",25,"A0","AJSROOT1:/情報提供基盤/EXA-X6系/汎用集計・フロア取込系","A1","ユニット別フロアマスタテンポラリネット","A2","ユニット別フロアマスタテンポラリ作成","A3","@52X6013","ACTION_VERSION","0600","B0","n","B1","1","B2","jp1admin","B3","psd240","B4","a","C0","PSC642","C1","","C2","281767","C3","PSC642","C4","0","C5","0","C6","r","E0","1641435451","E1","1641435458","E2","0","E3","0","H2","578828","H3","pj","H4","q","PLATFORM","NT",

 

 

Extraction used:

(?:[^,]+,){14}(?<alert_description>[^,]+),

 

Please help extract the highlighted fields.

 Thank you

0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

If you mean breaking in the middle, it is stopping when it reaches the comma, that's because that's what the match string does. Try this instead

(?:[^,]+,){14}(?<alert_description>\"[^\"]+\"),

You may or may not want to include the double quotes in the extracted field - if not, simply move them to outside the brackets

View solution in original post

ashvinpandey
Contributor

@srinivas_gowda Try using the below rex:

(?:[^,]+,){14}(?<alert_description>.*)\,\"Error

In case you want to use in splunk query:

| rex field = _raw "(?:[^,]+,){14}(?<alert_description>.*)\,\"Error"

Also if this reply helped you in solving your problem, an up-vote would be appreciated.

Tags (1)

ITWhisperer
SplunkTrust
SplunkTrust

If you mean breaking in the middle, it is stopping when it reaches the comma, that's because that's what the match string does. Try this instead

(?:[^,]+,){14}(?<alert_description>\"[^\"]+\"),

You may or may not want to include the double quotes in the extracted field - if not, simply move them to outside the brackets

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...