Splunk Search

How to get the count of events which are in between a range in one query?

chandrasekharko
Path Finder

I need to get the count of events which are in between a range in one query. Ex: number of calls which took 10-20 seconds, 20-30 seconds, 30-60 seconds, 60-90 seconds, >90 seconds.

0 Karma

493669
Super Champion

Try this run anywhere search:

|makeresults|eval number=30
|append[|makeresults|eval number=10]
|append[|makeresults|eval number=12]
| rangemap field=number low=10-20 elevated=21-30 medium=31-50 default=severe|stats count by range

similarly you can set duration in rangemap and find its statistical count

0 Karma
Get Updates on the Splunk Community!

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...