Splunk Search

Searching for times being reached within the hour

mlg
Observer

Hi, I am new to Splunk and working with parking records. Within my events, I have a permit_expiry field, which is a date and time a few or so hours after the initial data timestamp.

How do I display the number of permit_expiry which are occurring within the hour. I understand there is the now() function which holds the current time, but am unsure how to utilise it.

My draft search is below, but I know there is something missing within the "now() + 1 hour".

sourcetype="parking_log"
| where permit_expiry < now() + 1 hour
| stats count by permit_expiry

Many thanks!

Labels (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Check out the relative_time function in the Search Reference manual.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

See just what you’ve been missing | Observability tracks at Splunk University

Looking to sharpen your observability skills so you can better understand how to collect and analyze data from ...

Weezer at .conf25? Say it ain’t so!

Hello Splunkers, The countdown to .conf25 is on-and we've just turned up the volume! We're thrilled to ...

How SC4S Makes Suricata Logs Ingestion Simple

Network security monitoring has become increasingly critical for organizations of all sizes. Splunk has ...