Splunk Search

Results on daily basis with rangemap

vijkuma
Engager

My Query : --- | stats count by "response time" | rename "response time" as "time_taken" | rangemap field=time_taken upto_5_sec=0-5000 default=more_then_5_sec | stats sum(count) by range

How can i get this result distributed on daily basis.

Current result : 

upto_5_sec100
more_then_5_sec1

 

Expected result :

2020-12-05upto_5_sec80
 more_then_5_sec0
   
2020-12-06upto_5_sec20
 more_then_5_sec1

 

Labels (3)
0 Karma
1 Solution

scelikok
SplunkTrust
SplunkTrust

@vijkuma , please try below;

| stats count by "response time" _time
| rename "response time" as "time_taken" 
| rangemap field=time_taken upto_5_sec=0-5000 default=more_then_5_sec 
| bin span=1d _time 
| stats sum(count) as count by _time range 
| stats list(range) as range list(count) as count by _time
If this reply helps you an upvote and "Accept as Solution" is appreciated.

View solution in original post

vijkuma
Engager

This worked. @scelikok  Thanks for the help. Much appreciated !!! 

0 Karma

scelikok
SplunkTrust
SplunkTrust

@vijkuma , please try below;

| stats count by "response time" _time
| rename "response time" as "time_taken" 
| rangemap field=time_taken upto_5_sec=0-5000 default=more_then_5_sec 
| bin span=1d _time 
| stats sum(count) as count by _time range 
| stats list(range) as range list(count) as count by _time
If this reply helps you an upvote and "Accept as Solution" is appreciated.
Get Updates on the Splunk Community!

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

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...