Splunk Search

REGEX HELPING PLEASE

trevorkubheka
New Member

trevorkubheka_0-1597146695489.png

struggling to extract underlined items as RUN NAME

 

Labels (1)
Tags (1)
0 Karma

thambisetty
SplunkTrust
SplunkTrust

Simple regex:

| rex “\"run\.name\"\:\"(?<runname>[^\"]+)”

run.name will be extracted to runname field.

 

————————————
If this helps, give a like below.
0 Karma

stonefr33
Explorer

This should do the trick, thi

| rex field=_raw "run\.name":"(?<RunName>[\w\s.]+)"

The named capture group doesn't like the  space but you can use the "| rename RunName AS "Run Name" "

http://regex101.com is where I do most of my testing

stonefr33_0-1597149070030.png

 

0 Karma

trevorkubheka
New Member

does it work the same for below extract? cause im not getting it, also tried it on regex101

------------------------------------------------------------------------------------------------------------------------------------

2020-08-11 14:29:42,212 [8618-12939] ERROR NodePoolServiceImpl - [urn:uuid:979ECCA3B9BACEB335159714896138959] Find and lock (capabilities : [{"extra.executor.id":{"host.name":"https://spbbwfapp1v.standardbank.co.za:8443","context.path":"/workfusion","task.uuid":"f6bb5671-b4c3-4917-bd02-01e23488a9f6","run.name":"Business Banking AO and Sales 2020/08/11","run.uuid":"9c1d82a7-16e2-4362-9a5d-404d2b694b7d","run.author.fullname":"Mark Erasmus","run.author.email":"Mark.Erasmus@standardbank.co.za","task.name":"ia-process-business-banking-ao v2.0.3 (UpdateCompanyDataRobot)"},"browserName":"chrome","javascriptEnabled":true,"maximize.on.startup":true,"chromeOptions":{"args":[],"extensionFiles":[],"extensions":[],"experimentalOptions":{},"capabilities":{"caps":{}}},"platform":"WINDOWS"}]) failed with message : [urn:uuid:979ECCA3B9BACEB335159714896138959] Can not find any free node with requested capabilities [{"extra.executor.id":{"host.name":"https://spbbwfapp1v.standardbank.co.za:8443","context.path":"/workfusion","task.uuid":"f6bb5671-b4c3-4917-bd02-01e23488a9f6","run.name":"Business Banking AO and Sales 2020/08/11","run.uuid":"9c1d82a7-16e2-4362-9a5d-404d2b694b7d","run.author.fullnam

 

@stonefr33 

0 Karma

stonefr33
Explorer

My bad forgot to escape the double quotes for splunk. the section in the square brackets with catch a-zA-Z0-9 backslash and forward slash. If there are other characters $,%,- etc.. in the field they will need added

| rex field=_raw "\"run\.name\":\"(?<RunName>[\w\\\\/\s]+)\","

 

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to January Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...

[Puzzles] Solve, Learn, Repeat: Reprocessing XML into Fixed-Length Events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...