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!

Announcing Scheduled Export GA for Dashboard Studio

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

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...