Splunk Search

Timing inner transactions

RVDowning
Contributor

I Have transactions within transactions, namely something like the following:

PlanId, [OPEN PLAN START] Action="AAA"
.
PlanId, [OPEN PLAN End] Action="AAA"
PlanId, [BBB START] Action="BBB"
.
.
PlanId, [BBB End]Action="BBB"
PlanId, [MMM START] Action="MMM"
.
.
PlanId, [MMM End]Action="MMM"

this would be followed by another transaction with a new PlanId, etc.

I can do the following:
source="blahblah" | transaction PlanId startswith="[OPEN PLAN START]"
| table PlanId, Action, duration
which gives me a table of the PlanIds, Actions, and durations of the outer transaction.

The question is, how can I get the durations of the individual actions within each PlanID, namely the duration of AAA, BBB, MMM, etc.

Also, it would be of interest to get the average durations of all AAA, BBB, MMM etc across all PlanIds.

Tags (2)
0 Karma

somesoni2
Revered Legend

Try something like this

source="blahblah" | transaction PlanId,Action startswith="START]" endswith="END]" | table PlanId, Action, duration
0 Karma

somesoni2
Revered Legend

What issue do you see in the output of the answer I gave? Since, we don't know the actual events, it would help if you can describe how far it is from the expected.

0 Karma

RVDowning
Contributor

I wasn't sufficiently clear in my problem description.

Guess what I'm looking for is output something like:
PlanID1 AAA duration
BBB duration
.
EEE duration
PlanId2 AAA duration
BBB duration
.
EEE duration
.
.

etc.

(of course the AAA, BBB, etc are not in alphabetical order.

So, a given PlanId may be opened more than once and will have its own set of internal transactions. Each will start with [OPEN PLAN START] and continue as long as the PlanId stays the same and another [OPEN PLAN START] is not encountered.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Persistent Queue at TcpOut — One of Splunk's Most Practical Features

Splunk introduced persistent queueing at the tcpout layer as one of the most practical resilience features in ...

Skip the Awkward Silence: Have a .conf-ersation at .conf26

Picture this. You arrive at .conf26 already having your socializing and networking plans mapped out. No ...

Rethinking Zero Trust: From Product Purchases to Logical Control Evidence

Implementing Zero Trust (ZT) across complex environments often falters at the very beginning due to a ...