Splunk Search

Extract the Data from two line of the logs

UsplunkC
New Member

I need some help to extract the data from two lines as specified above but unable to do that.
Following are the two log lines

2013-01-18 17:54:50,188 [PxtId - 699479170] [PId - (null)] [MID: 157] DEBUG CloudComputingServiceInterceptor - Operation context: PyathonxId : 699479170, ApplicationId: CComp2, UserId: 7, Id: 1

5:54:50.188 PM 2013-01-18 17:54:50,188 [PxtId - 699479170] [PId - (null)] [MID: 157] DEBUG Cloud.Computing.Service - Enter GetNewData ...

PxtID is common in both the cases and i need to find based on UserId: (variable) how many times "Enter GetNewData ..." has been called....

Something like following
UserID: 7 = 15
UserID: 2 = 10
Or
If i provide UserId in the query it provide me the logs so I can count manually.

Tags (1)
0 Karma

ytamura
Path Finder

I'm not sure if I completely understand your question, but I'm assuming that PxtId is unique to each pair? If so, you can use a transaction to group those pairs into a single event, then do a count by UserId:

your search to isolate those two types of logs | transaction PxtId | chart count by UserId

This is assuming that both PxtID and UserId have been parsed as fields. You can do a similar search using a join on PxtId.

0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In January, the Splunk Threat Research Team had one release of new security content via the Splunk ES Content ...

Expert Tips from Splunk Professional Services, Ensuring Compliance, and More New ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Observability Release Update: AI Assistant, AppD + Observability Cloud Integrations & ...

This month’s releases across the Splunk Observability portfolio deliver earlier detection and faster ...