Splunk Search

Alternative to "transaction" command

clyde772
Communicator

Hey Splunkers~!

What is the alternative to "transaction" command? altimately to calculate transaction duration. We are in an LB environment where the data is scattered amongst 4 indexers. I've heard that transaction isn't map reduce-able.

Could a guru share a tip on calculating transaction duration with out using transaction? "stat" would work, but what would be a good way?

so it will look like

stats values(_time), values(desc), count by SESSION_ID

What would be a good way to calculate the start and end time?

Cheers!

Tags (2)

gkanapathy
Splunk Employee
Splunk Employee

Well, it is map-reduceable (and map-reduced by Splunk), it's just not very efficiently map-reduceable, due to fact that all events must be sent to the search head to assemble a transaction. However, if you are only interested in the duration, yes, you don't need to send all events, and therefore there are more efficient ways to compute it.

... | stats earliest(_time) as start latest(_time) as end by SESSION_ID | eval dur=end-start

or

... | stats range(_time) as dur by SESSION_ID 
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...