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
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...