Splunk Search

How can I group timechart data by day if the day starts at 10 p.m. and ends 10 p.m. the next day?

sk8asd123
Engager

I'm currently running this search

<data> | timechart span=24h count by day

This gives me from midnight to midnight, but I need 10 p.m. to 10 p.m. to capture a 'work day'

Tags (1)
1 Solution

martin_mueller
SplunkTrust
SplunkTrust

Assuming "today" starts two hours earlier rather than 22 hours later, you could do this:

<data> | eval _time = relative_time(_time, "+2h") | timechart span=1d count

Basically shifts your day by two hours.

View solution in original post

martin_mueller
SplunkTrust
SplunkTrust

Assuming "today" starts two hours earlier rather than 22 hours later, you could do this:

<data> | eval _time = relative_time(_time, "+2h") | timechart span=1d count

Basically shifts your day by two hours.

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