Splunk Search

regular expression

sphiwee
Contributor

Can i get a regular expression to show TSK KUBHEKA v2.0.70 from the below extract





2020-10-13 17:24:15 [bp-[xxxxxxxxx]-completeMachineRun-2053693] HitService [INFO] Created typed run Run: id=2053695, xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx name=AO TSK KUBHEKA v2.0.70 (verificationservice_VerificationFinalization) {size:0, status:READY_TO_PROCESS, rootRun:2c863fbe-7896-4e98-8f7f-7c79f930ab86, data:}

Labels (1)
0 Karma

inventsekar
SplunkTrust
SplunkTrust
| makeresults |eval log="2020-10-13 17:24:15 [bp-[xxxxxxxxx]-completeMachineRun-2053693] HitService [INFO] Created typed run Run: id=2053695, xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx name=AO TSK KUBHEKA v2.0.70 (verificationservice_VerificationFinalization) {size:0, status:READY_TO_PROCESS, rootRun:2c863fbe-7896-4e98-8f7f-7c79f930ab86, data:}" | rex field=log "name\=\w+\s+(?<name_field>.*)\(" | table name_field

rex-name.jpg

thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !

sphiwee
Contributor

im sorry please include 

(verificationservice_VerificationFinalization)
0 Karma

inventsekar
SplunkTrust
SplunkTrust

Please update that rex last part of the rex -  "\(" replace with "\{". 


EDIT - added  the image and edited the code

| makeresults |eval log="2020-10-13 17:24:15 [bp-[xxxxxxxxx]-completeMachineRun-2053693] HitService [INFO] Created typed run Run: id=2053695, xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx name=AO TSK KUBHEKA v2.0.70 (verificationservice_VerificationFinalization) {size:0, status:READY_TO_PROCESS, rootRun:2c863fbe-7896-4e98-8f7f-7c79f930ab86, data:}" | rex field=log "name\=\w+\s+(?<name_field>.*)\{" | table name_field

rex-name-new.jpg

thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @sphiwee,

check if a regex like this can solve your problem:

| regex "name\=\w+\s+(?<my_field>.*)\s+v\d+\.\d+\.\d+"

that you can test at https://regex101.com/r/0eFSVC/1

Ciao.

Giuseppe

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