Splunk Search

extract module name (till colon)

indeed_2000
Motivator
Hi
regex for extract module name 
 
here is the log:
15:25:36.999 user module_W: A[00]B[0000000]C[0]L: process read compeleted!
the module name is "module_W" after user "start  with star wildcard till colon"
 
Any idea?
Thanks,
 
Labels (6)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| rex "^\S+\s\S+\s(?<module>[^:]+)"

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust
| rex "user (?<module>[^:]+)"

indeed_2000
Motivator

thank you for answer, user is not static value are different for users, is it possible to set (variable user after that space) for first part? 

FYI: there are some special character in users

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| rex "^\S+\s\S+\s(?<module>[^:]+)"
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...