Splunk Search

How to group my search results with respect to response time ranges?

kmahamkali
New Member

here is the situation:
I have two fields
1. Response time that needs grouping like this (Low=0-1.2, Medium=1.2-1.5, High=1.5-1.8 default=Critcal)
2. CodeName that corresponds to the response time

i want to see top 5 codenames trending graph with bucketing as mentioned above for a span of 15min.

I tried this
my search| rangemap field=ResponseTime Low=0-1.2, Meduim=1.2-1.5, High=1.5-1.8 default=Critcal | timechart count span=15 min by range

0 Karma

Kwip
Contributor

Yes you have to go with eval case in this scenario,

my search
| eval Range=case(
ResponseTime>0 AND ResponseTime<1.2, "Low", 
ResponseTime>1.2 AND ResponseTime<1.5, "Medium", 
ResponseTime>1.5 AND ResponseTime<1.8, "High", 
1==1 "Critical")
| timechart span=15 range by CodeName
0 Karma

JDukeSplunk
Builder

I don't think rangemap likes decimals. Maybe the answer posted here using |eval case will be a suitable substitute.

https://answers.splunk.com/answers/5659/rangemap-does-not-work-with-decimals.html

somesoni2
SplunkTrust
SplunkTrust

What's the output of your current search and what's the output should be?

0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...