Splunk Search

Timechart count between times( (eg 5:00 PM to 5:00 PM) of two different day for last 60 days

nilendra1988
New Member

Hi ,

I am counting events per day for last 60 days between 5:00 PM to 5:00 PM.
I tried using timechart , but seems it didn't worked for me.
as it counting from 00:01 everyday .

Please suggest any options to do so.

Thanks

0 Karma

somesoni2
Revered Legend

Try like this

your base search
| bucket span=1h _time
| eval _time=relative_time(_time,"-17h")
| rename COMMENT as "Remove this line. Above line change 5PM to 00AM for day level calculation"
| timechart span=1d count
| eval _time=relative_time(_time,"+17h")
| rename COMMENT as "Remove this line. Above line change 00AM to 5PM for restore original values"
0 Karma

thambisetty
SplunkTrust
SplunkTrust

Hi,

Not tested thought, try something like below,

Select time range from -60d 5PM TO TODAY 5PM

| bin _time span=24h
| stats count by _time
————————————
If this helps, give a like below.
0 Karma

nilendra1988
New Member

I tried that , not working.
2018-05-25 01:00.. it is taking this time for every row .
_time count
2018-05-25 01:00 1
2018-05-26 01:00 3
2018-05-27 01:00 2

0 Karma
Get Updates on the Splunk Community!

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

A Guide To Cloud Migration Success

As enterprises’ rapid expansion to the cloud continues, IT leaders are continuously looking for ways to focus ...

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...