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!

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

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