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!

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