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
Legend

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
Legend

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

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