Splunk Search

Min and Max Response Time

rj1408
Path Finder

Hi I want to calculate Min and Max Response time only if the status is success.

Below is the table format:


MicroServiceTotal_TransactionSuccessFailureAvgFailure%Success%Min_Response_TimeMax_Response_time
         
LostStolenCard752522328.5771.43  
CreditLimit1501543240100  
Labels (2)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| eval successTime = if(staus="Success", responseTime, null)
| stats max(successTime) as Max_Response_time min(successTime) as Min_Response_Time by MicroService

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

You can calculate the numbers then delete them if the status is not success.

... | stats min(ResponseTime) as Min_Response_Time, max(ResponseTime) as Max_Response_Time by MicroService
| eval Min_Response_Time=if(Status=0,null,Min_Response_Time), Max_Response_Time=if(Status=0,null, Max_Response_Time)
---
If this reply helps you, Karma would be appreciated.

ITWhisperer
SplunkTrust
SplunkTrust
| eval successTime = if(staus="Success", responseTime, null)
| stats max(successTime) as Max_Response_time min(successTime) as Min_Response_Time by MicroService

rj1408
Path Finder
0 Karma
Get Updates on the Splunk Community!

Shape the Future of Splunk: Join the Product Research Lab!

Join the Splunk Product Research Lab and connect with us in the Slack channel #product-research-lab to get ...

Auto-Injector for Everything Else: Making OpenTelemetry Truly Universal

You might have seen Splunk’s recent announcement about donating the OpenTelemetry Injector to the ...

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...