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!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  &#x1f680; Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...