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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

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