Splunk Search

How do I identify events which are part of a transaction in this case?

ahsishsharmaait
New Member

Hi,

We have events like this

Time1 8000 UserId1 Event-Launch ProcessId-10000 ...
Time2 10000 UserId1 Event-Login _ ...
Time3 10000 UserId1 Event-Launch ProcessId-11000 ...
Time4 11000 UserId1 Event-Process Document ...
Time5 11000 UserId1 Event-Logout

We have processes which auch other processes to finish some tasks. For example, the launcher can launch a Login process, which then launches a process which does some other work, which can then launch other processes.

Each launch is identified by Event-Launch and has the process id of the next process it is starting before exiting. The second field of each line has the process id of the process.

Everything between Event-Launch (first time for a user) and Event-Logout needs to be a transaction.
We do this in custom code by parsing out each event and then searching the log for entries which match the UserId and ProcessId. We do this till we find a logout event for that user.

How can I group tthese into a transaction using splunk?

Tags (2)
0 Karma

MuS
SplunkTrust
SplunkTrust

Hi ahsishsharmaait,

if your field UserId1 is unique and extracted as field UserId, you can use a transaction like this:

YourBaseSearchHere | transaction UserId startswith="Event-Launch" endswith="Event-Logout" | ...

UPDATE: since the ProcessId is the unique field this should be extracted and used in the transaction like this:

YourBaseSearchHere | transaction ProcessId startswith="Event-Launch" endswith="Event-Logout" | ...

hope this helps ...

cheers, MuS

0 Karma

MuS
SplunkTrust
SplunkTrust

update ping

0 Karma

ahsishsharmaait
New Member

A user can have multiple transactions running in parallel. I need to extract process id and match on basis of that.

0 Karma
Get Updates on the Splunk Community!

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...