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!

.conf25 Registration is OPEN!

Ready. Set. Splunk! Your favorite Splunk user event is back and better than ever. Get ready for more technical ...

Detecting Cross-Channel Fraud with Splunk

This article is the final installment in our three-part series exploring fraud detection techniques using ...

Splunk at Cisco Live 2025: Learning, Innovation, and a Little Bit of Mr. Brightside

Pack your bags (and maybe your dancing shoes)—Cisco Live is heading to San Diego, June 8–12, 2025, and Splunk ...