Splunk Search

Field Extraction Struggle

sphiwee
Contributor

i have these log entries, and I'm trying to extract the underlined data as "Business_Process"

 

sphiwee_0-1597246959262.png

i'm using the below regex, on geg101 it extracts just fine but on splunk it exctracts a huge chunk.

 rex field=_raw "\Drun\.name\D:\D(?<Business_Process>.+)\D,\Drun.u"

 

i get below result in splunk

sphiwee_1-1597247468022.png

 

Labels (1)
Tags (1)
0 Karma
1 Solution

thambisetty
SplunkTrust
SplunkTrust

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

don’t forget to replace double quotes from your keyboard. Double quotes may not match as I am typing from them my phone.

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

View solution in original post

thambisetty
SplunkTrust
SplunkTrust

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

don’t forget to replace double quotes from your keyboard. Double quotes may not match as I am typing from them my phone.

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

sphiwee
Contributor

having same issue, trying to extract red text

"run\.author\.fullname\D:\"(?<USER>.+\"\,\"r)"

 

 

0 Karma

thambisetty
SplunkTrust
SplunkTrust

just advice - don't post actual data here.


| rex “run\.author\.fullname\”:\”(?<User>[^\”]+)”

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

sphiwee
Contributor

sphiwee_1-1597512234006.png

Hi thanks for the advice, seem to be getting an error on that regex 

 

0 Karma

thambisetty
SplunkTrust
SplunkTrust
| rex "run\.author\.fullname\":\"(?<User>[^\"]+)"

try now. the issue is with double quotes, as I had typed them from my phone.

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

sphiwee
Contributor

Yes I figured it was that, sorry to be bothersome.. any idea how can i vizualize a relationship between  Business_Process and User ? i want to show in a cool way which user ran which business process 

0 Karma

thambisetty
SplunkTrust
SplunkTrust

| stats values(Business_process) as business_process by User

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

sphiwee
Contributor

wow thanks bro works perfectly, how can i learn to perfect my regex skills?

0 Karma

richgalloway
SplunkTrust
SplunkTrust
Please share your sample data as text rather than a screen shot so people can test with it.
---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

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

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...