Reporting

Scheduling search - how to snap to current hour for now?

the_wolverine
Champion

I'm scheduling a search that spans -1h@h and ends -@h, however the UI doesn't like my syntax:

Cannot parse time argument 'dispatch.latest_time': '-@h'

0 Karma
1 Solution

DaveO35
Explorer

This would give you the previous hour snapped back to current hour (ie. if current time is 10:15, this would be 9:00 - 10:00):
earliest=-1h@h latest=@h

This would give you the previous hour from now (if current time is 10:15, 9:15 to 10:15):
earliest=-1h latest=now

View solution in original post

DaveO35
Explorer

This would give you the previous hour snapped back to current hour (ie. if current time is 10:15, this would be 9:00 - 10:00):
earliest=-1h@h latest=@h

This would give you the previous hour from now (if current time is 10:15, 9:15 to 10:15):
earliest=-1h latest=now

alacercogitatus
SplunkTrust
SplunkTrust

The argument for latest_time should work by using -h without the @.

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...