Splunk Search

Nested transactions

RVDowning
Contributor

I have data records in the following format:

Method=OuterTransactionName Type=Start ID=12345

Method=InnerTransactionNameAAAA Type=Start ID=12345

Method=InnerTransactionNameAAAA Type=End ID=12345

Method=InnerTransactionNameBBBB Type=Start ID=12345

Method=InnerTransactionNameBBBB Type=End ID=12345
.
.
.

Method=InnerTransactionNameZZZZ Type=Start ID=12345

Method=InnerTransactionNameZZZZ Type=End ID=12345

Method=OuterTransactionName Type=End ID=12345

So, every transaction record has the same id, with the outer transaction having a method name different from the inner transaction method names. Not sure how to structure the search to both list and/or find the durations of both the outer transaction as well as the inner transactions

Tags (2)
0 Karma

somesoni2
Revered Legend

This should do it (tested on your sample logs)

your base search | transaction ID,Method startswith=Type=Start endswith=Type=End
0 Karma
Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Dynamic formatting from XML events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Stronger Security with Federated Search for S3, GCP SQL & Australian Threat ...

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