Splunk Search

Percentile calculation

chaitu99
Explorer

source="file.txt" | transaction startswith="message1" endswith="message2" | stats count values(duration) as DUR

log file 5 events are matching

count DUR
5 0.095
0.056
0.075
0.064
0.095

I want to calculate the percentage of all events duration coming which is less than 75 miliseconds.

Please let me know how to go ahead.

Tags (1)
0 Karma
1 Solution

martin_mueller
SplunkTrust
SplunkTrust

You could replace your stats with something like this:

... | stats count as total count(eval(duration<0.075)) as count | eval percentage = count * 100 / total

View solution in original post

martin_mueller
SplunkTrust
SplunkTrust

You could replace your stats with something like this:

... | stats count as total count(eval(duration<0.075)) as count | eval percentage = count * 100 / total
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...