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!

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...