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!

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!

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

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...