Dashboards & Visualizations

Want to display my result only for this time (0-12:00 UTC time) .

rajhemant26
New Member

Hello, everyone.
Want to display my result only for this time (0-12:00 UTC) for all the weekdays (Mon-Fri ).

Tags (1)
0 Karma

marycordova
SplunkTrust
SplunkTrust

add this to your base search

date_wday IN (monday,tuesday,wednesday,thursday,friday) date_hour>=0 date_hour<=12

you might need to tweak the <=12 depending on your requirements

index=dcsdjc host=awer THREAD_WALL_MS!=null date_wday IN (monday,tuesday,wednesday,thursday,friday) date_hour>=0 date_hour<=12 
| bin _time span=1h 
| streamstats count as Req by host, _time 
| eval RequestsPerMin=Req/60 
| eval RequestsPerSec=RequestsPerMin/60 
| stats avg(RequestsPerMin) as AvgRequestsPerSec, max(RequestsPerMin) as MaxRequestsPerSec, p95(RequestsPerMin) as P95RequestsPerSec by host 
| eval AvgRequestsPerSec=round(AvgRequestsPerSec,2), MaxRequestsPerSec=round(MaxRequestsPerSec,2), P95RequestsPerSec=round(P95RequestsPerSec,2) 
| sort -MaxRequestsPerSec, -P95RequestsPerSec
@marycordova
0 Karma

pkeenan87
Communicator

You should be able to do this with the date_hour & date_wday fields. You should just need to add this to the first part of your search:

date_hour>=0 date_hour<12 (date_wday=monday OR date_wday=tuesday OR date_wday=wednesday OR date_wday=thursday OR 
date_wday=friday)

Full query

index=dcsdjc host=awer THREAD_WALL_MS!=null date_hour>=0 date_hour<12 (date_wday=monday OR date_wday=tuesday OR 
date_wday=wednesday OR date_wday=thursday OR date_wday=friday) | bin _time span=1h
| streamstats count as Req by host, _time
| eval RequestsPerMin=Req/60
| eval RequestsPerSec=RequestsPerMin/60
| stats avg(RequestsPerMin) as AvgRequestsPerSec, max(RequestsPerMin) as MaxRequestsPerSec, p95(RequestsPerMin) as 
P95RequestsPerSec by host |eval AvgRequestsPerSec=round(AvgRequestsPerSec,2), 
MaxRequestsPerSec=round(MaxRequestsPerSec,2), P95RequestsPerSec=round(P95RequestsPerSec,2)|sort -MaxRequestsPerSec, - 
P95RequestsPerSec
0 Karma
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...