Splunk Search

Event count before and after a specified time

jboustead
Explorer

I am looking to count the number of events that occur before and after a specified time (8am) each day to give a table like for example:

Events before 8amEvents after 8am
40050

 

Any help greatly appreciated?

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| stats count(eval(date_hour<8)) as "Events before 8am" count(eval(date_hour>=8)) as "Events after 8am"

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| stats count(eval(date_hour<8)) as "Events before 8am" count(eval(date_hour>=8)) as "Events after 8am"
0 Karma
Get Updates on the Splunk Community!

Index This | What did the zero say to the eight?

June 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

Splunk Observability Cloud's AI Assistant in Action Series: Onboarding New Hires & ...

This is the fifth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Now Playing: Splunk Education Summer Learning Premieres

It’s premiere season, and Splunk Education is rolling out new releases you won’t want to miss. Whether you’re ...