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!

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 ...