Splunk Search

Extract a field which apears only in the first event of a transaction

eisaak
Engager

I have the following to display average latency.
It can be accelerated (vs. using the transaction command).
Now I would like to update this to "average latency per request type". Bu the requestType can be extracted only from the first event of each of the "transactions" below.

...stats min(_time) AS startOfTransaction max(_time) AS endOfTransaction by context_flow | eval transactionDuration=endOfTransaction-startOfTransaction | bucket startOfTransaction span=1h | eval startOfTransaction = strftime( startOfTransaction,"%m/%d/%Y %I:%M:%S") | stats avg(transactionDuration) as avgDuration by startOfTransaction | chart sum(avgDuration) as "Average Latency in Seconds" by startOfTransaction

1 Solution

martin_mueller
SplunkTrust
SplunkTrust

Include first(requestType) as requestType in your stats calls to carry that field through the entire pipeline.

View solution in original post

martin_mueller
SplunkTrust
SplunkTrust

Include first(requestType) as requestType in your stats calls to carry that field through the entire pipeline.

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