Splunk Search

Skip one hour in one day search

abhi144
New Member

I wanted to search for full day except one hour from 6.30am to 7.30am. I am not able to do it. Can anyone help me in this.

0 Karma
1 Solution

Ayn
Legend

There's no foolproof way of putting this as an initial filter in your search that I know of, however you could create fields and then filter on those:

<yourbasesearch> | eval hourandminute=strftime(_time,"%H").strftime(_time,"%M") | search NOT (hourandminute>=630 AND hourandminute<=730)

View solution in original post

Ayn
Legend

There's no foolproof way of putting this as an initial filter in your search that I know of, however you could create fields and then filter on those:

<yourbasesearch> | eval hourandminute=strftime(_time,"%H").strftime(_time,"%M") | search NOT (hourandminute>=630 AND hourandminute<=730)

abhi144
New Member

Thanks Ayn.

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...