Splunk Search

With the transaction command, how do I get the duration between the first startswith to the last endswith?

xindeNokia
Path Finder

query like below:

| transaction startswith="Init" endswith="FINISHED" by ip
| table duration ip

Each IP has multiple "init" and "finish". Is there a way to group the first "init" to the last "Finished" instead of grouping the closest two?

Thanks in advance!

0 Karma
1 Solution

renjith_nair
SplunkTrust
SplunkTrust

@xindeNokia,

Try stats

"your search"  "init" OR "finished" |stats earliest(_time) as first,latest(_time) as last by ip|eval duration=last-first
Happy Splunking!

View solution in original post

0 Karma

renjith_nair
SplunkTrust
SplunkTrust

@xindeNokia,

Try stats

"your search"  "init" OR "finished" |stats earliest(_time) as first,latest(_time) as last by ip|eval duration=last-first
Happy Splunking!
0 Karma

xindeNokia
Path Finder

it works, thank you very much! much appreciated!

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

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 ...