<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to exclude specific time ranges in search results in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-exclude-specific-time-ranges-in-search-results/m-p/199485#M39488</link>
    <description>&lt;P&gt;If you're trying to detect a 0-event period excluding some outage window timeframe, here's a generic search you could use:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=my_index sourcetype=my_sourcetype  my_filter_criteria_here
| timechart span=1m count 
| search count=0 
| where NOT (date_wday=="sunday" AND date_hour &amp;gt;= 0 AND date_hour &amp;lt; 4)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm doing the where clause after detecting 0-event minutes because if you initially filter by those windows, you'll see no events there. Obviously if you are looking for a certain event rather than monitoring for a void in events you can do that filter right in the first line of the search.&lt;BR /&gt;
You'd have to add more to your where clause to specify bi-weekly windows.&lt;/P&gt;</description>
    <pubDate>Wed, 10 Apr 2019 17:12:15 GMT</pubDate>
    <dc:creator>jiman7697</dc:creator>
    <dc:date>2019-04-10T17:12:15Z</dc:date>
    <item>
      <title>How to exclude specific time ranges in search results</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-exclude-specific-time-ranges-in-search-results/m-p/199481#M39484</link>
      <description>&lt;P&gt;I have a datasource which contains availability statistics from an application. I also have a predetermined maintenance schedule that occurs every two weeks on the same day and time. How can I use search to exclude the date/time ranges for my maintenance schedule in my search results?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Mar 2014 14:50:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-exclude-specific-time-ranges-in-search-results/m-p/199481#M39484</guid>
      <dc:creator>jedatt01</dc:creator>
      <dc:date>2014-03-26T14:50:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude specific time ranges in search results</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-exclude-specific-time-ranges-in-search-results/m-p/199482#M39485</link>
      <description>&lt;P&gt;If do something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=yourIndex| eval MaintEnd=strptime("2014/03/26 11:00:00 AM","%Y/%m/%d %H:%M:%S %p") | eval MaintStart=strptime("2014/03/26 10:50:00 AM","%Y/%m/%d %H:%M:%S %p") | where _time &amp;gt; MaintEnd OR _time &amp;lt; MaintStart
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Mar 2014 15:16:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-exclude-specific-time-ranges-in-search-results/m-p/199482#M39485</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-03-26T15:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude specific time ranges in search results</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-exclude-specific-time-ranges-in-search-results/m-p/199483#M39486</link>
      <description>&lt;P&gt;That gets me closer. Now how can I specify a relative day, like every friday?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Mar 2014 15:33:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-exclude-specific-time-ranges-in-search-results/m-p/199483#M39486</guid>
      <dc:creator>jedatt01</dc:creator>
      <dc:date>2014-03-26T15:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude specific time ranges in search results</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-exclude-specific-time-ranges-in-search-results/m-p/199484#M39487</link>
      <description>&lt;P&gt;If the maintenance window were &lt;EM&gt;every&lt;/EM&gt; wednesday between 3am and 5am you could do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=yourIndex NOT (date_wday=wednesday date_hour&amp;gt;=3 date_hour&amp;lt;5)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then Splunk would not even load those events off disk - great if a lot of volume happens during maintenance.&lt;BR /&gt;
However, I don't think there's a straightforward way of specifying "every other wednesday".&lt;/P&gt;</description>
      <pubDate>Wed, 26 Mar 2014 15:37:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-exclude-specific-time-ranges-in-search-results/m-p/199484#M39487</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-03-26T15:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude specific time ranges in search results</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-exclude-specific-time-ranges-in-search-results/m-p/199485#M39488</link>
      <description>&lt;P&gt;If you're trying to detect a 0-event period excluding some outage window timeframe, here's a generic search you could use:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=my_index sourcetype=my_sourcetype  my_filter_criteria_here
| timechart span=1m count 
| search count=0 
| where NOT (date_wday=="sunday" AND date_hour &amp;gt;= 0 AND date_hour &amp;lt; 4)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm doing the where clause after detecting 0-event minutes because if you initially filter by those windows, you'll see no events there. Obviously if you are looking for a certain event rather than monitoring for a void in events you can do that filter right in the first line of the search.&lt;BR /&gt;
You'd have to add more to your where clause to specify bi-weekly windows.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2019 17:12:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-exclude-specific-time-ranges-in-search-results/m-p/199485#M39488</guid>
      <dc:creator>jiman7697</dc:creator>
      <dc:date>2019-04-10T17:12:15Z</dc:date>
    </item>
  </channel>
</rss>

