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!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

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

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