Splunk Search

How to count over host by date with a set time range?

pkcbailey
New Member

I would like to "search |stats count over host by date` only for Midnight to 16:00 EST and I want to report a month of activity.

0 Karma
1 Solution

MuS
SplunkTrust
SplunkTrust

Hi pkcbailey,

you can either use chart or timechart for this. use either of the following two examples:

your search here earliest=-1mon@mon latest=-0mon@mon date_hour>=00 AND date_hour<=15 | bucket _time span=1d | chart count over _time by host

or

your search here earliest=-1mon@mon latest=-0mon@mon date_hour>=00 AND date_hour<=15 | timechart span=1d count by host

both examples will return a daily event count by host over the last month.

Hope that helps ...

cheers, MuS

View solution in original post

MuS
SplunkTrust
SplunkTrust

Hi pkcbailey,

you can either use chart or timechart for this. use either of the following two examples:

your search here earliest=-1mon@mon latest=-0mon@mon date_hour>=00 AND date_hour<=15 | bucket _time span=1d | chart count over _time by host

or

your search here earliest=-1mon@mon latest=-0mon@mon date_hour>=00 AND date_hour<=15 | timechart span=1d count by host

both examples will return a daily event count by host over the last month.

Hope that helps ...

cheers, MuS

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...