Splunk Search

Reporting on multiple transactions

bruceat
New Member

Hi all,

I want to track the duration of individual steps of a larger transaction. For example, I have :

2014-02-05 20:01:25 lcid=12345 Starting transaction 
2014-02-05 20:01:31 lcid=12345 Starting step A
2014-02-05 20:01:38 lcid=12345 Finished step A
2014-02-05 20:01:40 lcid=12345 Something else
2014-02-05 20:01:41 lcid=12345 Starting step B
2014-02-05 20:01:48 lcid=12345 Finished step B
2014-02-05 20:01:51 lcid=12345 Starting step C
2014-02-05 20:01:51 lcid=67890 Something else again
2014-02-05 20:01:58 lcid=12345 Finished step C
2014-02-05 20:02:00 lcid=12345 Finished transaction 

What I would like to do is to extract "step A", "step B" and "step C" durations individually.

I can do this for a single step easily enough with:
transaction lcid startswith="Starting step A" endswith="Finished step A"

Is there a way to get the duration for each of the three steps?

Thanks

Tags (1)
0 Karma

somesoni2
Revered Legend

Try this.

..your main search..| rex "lcid=[\d]*\s(?<status>[^ ]*)\s(step |trans)(?<actor>[^ ]*)" | eval actor=if(actor="action","Main",actor) | transaction actor startswith="Starting" endswith="Finished"
0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...