<?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 edit my alert to turn it off during a known maintenance window? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-alert-to-turn-it-off-during-a-known-maintenance/m-p/243488#M72465</link>
    <description>&lt;P&gt;You should modify the search so it does not match events which fall under the maint window using a combination of the date_wday and date_hour and if it's on specific days every month then date_mday. &lt;/P&gt;

&lt;P&gt;Ex, a maint window every sunday from 00:00:00 to 02:00:00, you could use "date_wday!=sunday AND (date_hour!=0 OR date_hour!=1)"&lt;/P&gt;

&lt;P&gt;Another idea would be to put your maintenance schedule into a lookup CSV, either as their epoch times or a "normal" timestamp you'll have to convert with strptime. Then just filter out events with times which match those ranges in the search. &lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 12:30:13 GMT</pubDate>
    <dc:creator>goodsellt</dc:creator>
    <dc:date>2020-09-29T12:30:13Z</dc:date>
    <item>
      <title>How to edit my alert to turn it off during a known maintenance window?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-alert-to-turn-it-off-during-a-known-maintenance/m-p/243485#M72462</link>
      <description>&lt;P&gt;Hello -&lt;/P&gt;

&lt;P&gt;I have an alert setup that I need to not fire on Sundays between 2:45pm and 4:00pm. Below is what I have configured. I'm getting alerts during the maintenance window. I could use a second set of eye to help spot what I have set wrong.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=hdx_was source="/hdx1/was70-32/AppServer/profiles/AppSrv01/logs/PRD3_XF*/SystemOut.log" "A connection failed but has been re-established" | eval wday=strftime(now(),"%a"),homi=strftime(now(),"%H%M"),dactivate=if(wday="Sun" AND homi&amp;gt;=1445 AND homi&amp;lt;=1600,"off",NULL)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2017 15:26:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-alert-to-turn-it-off-during-a-known-maintenance/m-p/243485#M72462</guid>
      <dc:creator>cj039165</dc:creator>
      <dc:date>2017-01-19T15:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my alert to turn it off during a known maintenance window?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-alert-to-turn-it-off-during-a-known-maintenance/m-p/243486#M72463</link>
      <description>&lt;P&gt;What is your alert condition? Do you alert on "number of events greater than 0" type or any custom condition?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2017 17:05:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-alert-to-turn-it-off-during-a-known-maintenance/m-p/243486#M72463</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-01-19T17:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my alert to turn it off during a known maintenance window?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-alert-to-turn-it-off-during-a-known-maintenance/m-p/243487#M72464</link>
      <description>&lt;P&gt;It's currently set to 'per result'&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2017 17:10:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-alert-to-turn-it-off-during-a-known-maintenance/m-p/243487#M72464</guid>
      <dc:creator>cj039165</dc:creator>
      <dc:date>2017-01-19T17:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my alert to turn it off during a known maintenance window?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-alert-to-turn-it-off-during-a-known-maintenance/m-p/243488#M72465</link>
      <description>&lt;P&gt;You should modify the search so it does not match events which fall under the maint window using a combination of the date_wday and date_hour and if it's on specific days every month then date_mday. &lt;/P&gt;

&lt;P&gt;Ex, a maint window every sunday from 00:00:00 to 02:00:00, you could use "date_wday!=sunday AND (date_hour!=0 OR date_hour!=1)"&lt;/P&gt;

&lt;P&gt;Another idea would be to put your maintenance schedule into a lookup CSV, either as their epoch times or a "normal" timestamp you'll have to convert with strptime. Then just filter out events with times which match those ranges in the search. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:30:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-alert-to-turn-it-off-during-a-known-maintenance/m-p/243488#M72465</guid>
      <dc:creator>goodsellt</dc:creator>
      <dc:date>2020-09-29T12:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my alert to turn it off during a known maintenance window?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-alert-to-turn-it-off-during-a-known-maintenance/m-p/243489#M72466</link>
      <description>&lt;P&gt;I see you calculated dactivate variable but not using it to filter results. I would just below to your current search.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your current search | where isnull(deactivate)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So if the alert ran on maintenance window, dactivate field will have value "off" and the search will not return any results.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2017 17:32:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-alert-to-turn-it-off-during-a-known-maintenance/m-p/243489#M72466</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-01-19T17:32:06Z</dc:date>
    </item>
  </channel>
</rss>

