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!

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