Splunk Search

[Inquiry]: Retrieving search results with schedule timings

dcresido
New Member

Hi everyone,

Good day!

I would like to ask about my search query below.

index="myIndex" source IN(*MyLogs*) host=server*
    | append
      [search "Missing process" 
      | eval myTime = _time
      | eval myHour=strftime(_time, "%H") 
      | eval myMinute=strftime(_time, "%M") 
      ]
        | search  ((myHour>=7 AND myMinute>=31) AND (myHour<=14 AND myMinute<=59))

And this is my use case: How can I retrieve search event from 7:31AM to 4:29PM from my search query?

Everytime I tried using the query above, I was able to retrieve some results if I use something like this

| search  ((myHour>=7 AND myMinute>=31) AND (myHour<=14 AND myMinute<=59))

But if I changed it to something like this

| search  ((myHour>=7 AND myMinute>=31) AND (myHour<=14 AND myMinute<=29))

I can no longer see any results. It seems that I do have some issues in assigning the minute parameters on this search query. But I'm not sure how to fix it.

Will you be able to provide some insights on how can I achieve my use case above?

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

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

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...