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!

What the End of Support for Splunk Add-on Builder Means for You

Hello Splunk Community! We want to share an important update regarding the future of the Splunk Add-on Builder ...

Solve, Learn, Repeat: New Puzzle Channel Now Live

Welcome to the Splunk Puzzle PlaygroundIf you are anything like me, you love to solve problems, and what ...

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...