Splunk Search

Exclude search on a specific time at a specific weekday (weekly maintenance window)

skyrider1
New Member

Hi

We have a search where we get the request time out of a webapplication. Of course those request times suffer during our weekly maintenance window. Now i tried to filter out those specific times by using the following filter:

|eval myHour=strftime(_time, "%H")
|eval myDay=strftime(_time, "%a")
|where NOT (( myHour >= 18 ) AND ( myHour <= 22 AND myDay=Thu))

The myDay on it's own doesn't work..

Somewho it's not working that way, so i appreciate any help...

Thanks

Tags (1)
0 Karma
1 Solution

kristian_kolb
Ultra Champion

Could you not use the date_* fields for this? Those should work unless you have servers in different time zones.

sourcetype=your_web_app NOT (date_wday = thursday date_hour >=18 date_hour <= 22 ) 

/Kristian

View solution in original post

kristian_kolb
Ultra Champion

Could you not use the date_* fields for this? Those should work unless you have servers in different time zones.

sourcetype=your_web_app NOT (date_wday = thursday date_hour >=18 date_hour <= 22 ) 

/Kristian

Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...