Splunk Enterprise

Rex field extraction

user93
Communicator

Hello,

I have a simple extraction I need to make on a new dataset that has not yet had the fields defined for me.

I want to extract the user name. The log structure is like so:

time stamp, server info, logstatus, userinfo, result

 

_raw= 2021-05-12 03:58:59,533 [#-####-abcd-#] INFO ServicesLogName#logStatus(): ## - User john.doe@username.com with IP 01.001.01.1 result [successful]

 

In every instance, the username value follows "User" and precedes "with IP" 

 

Index=basesearch application=specified
|rex field=_raw "(?<username>")

 

Thank you! 

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
Index=basesearch application=specified
|rex field=_raw "User\s(?<username>[^\s]+)\swith\sIP"

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust
Index=basesearch application=specified
|rex field=_raw "User\s(?<username>[^\s]+)\swith\sIP"
Get Updates on the Splunk Community!

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...