Splunk Search

How to extract the userID?

tankhanandita
Explorer

Hi

I want to extract the unique user ID for the users that are successfully logging in the KTB system

[2/11/00 12:45:35:039 ISTT] 00000115 SystemOut O User Login to KTB Successful - Bhatur- NT-000-TTT - PT-P065-APT
[2/11/00  9:27:26:877 ISTT] 00001309 SystemOut O User Login to KTB Successful - Bhatur- AM1353P - STYLE P Harry

Output should be:

NT-000-TTT

AM1353P

 

Labels (2)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| rex "User Login to KTB Successful\s-\s[^\-]+\-\s(?<user>\S+)"
0 Karma
Get Updates on the Splunk Community!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

(view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...