<?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: Problem with lookup for disabling alerts during maintenance in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Problem-with-lookup-for-disabling-alerts-during-maintenance/m-p/395479#M6972</link>
    <description>&lt;P&gt;The query that i have provided should do the same. It will run search a Index=os ONLY if there any hosts tagged as UnderMaintenance=Yes. &lt;/P&gt;</description>
    <pubDate>Sat, 11 Aug 2018 00:51:56 GMT</pubDate>
    <dc:creator>fferozbasha</dc:creator>
    <dc:date>2018-08-11T00:51:56Z</dc:date>
    <item>
      <title>Problem with lookup for disabling alerts during maintenance</title>
      <link>https://community.splunk.com/t5/Alerting/Problem-with-lookup-for-disabling-alerts-during-maintenance/m-p/395473#M6966</link>
      <description>&lt;P&gt;Sorry for the simple question, I am new to the Splunk world....&lt;/P&gt;

&lt;P&gt;I have a CSV loaded (StandardMaintenance.csv) which has two rows&lt;/P&gt;

&lt;P&gt;UnderMaintenance&lt;BR /&gt;
NO&lt;/P&gt;

&lt;P&gt;I want to add a check to each alert so that they will not fire during maintenance.&lt;/P&gt;

&lt;P&gt;Here is my code...&lt;/P&gt;

&lt;P&gt;....query goes here...&lt;BR /&gt;
| lookup StandardMaintenance.csv UnderMaintenance &lt;BR /&gt;
| search NOT UnderMaintenance="NO"&lt;/P&gt;

&lt;P&gt;What am I doing wrong or how better might I accomplish this?&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 19:56:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Problem-with-lookup-for-disabling-alerts-during-maintenance/m-p/395473#M6966</guid>
      <dc:creator>jmoeller</dc:creator>
      <dc:date>2018-08-08T19:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with lookup for disabling alerts during maintenance</title>
      <link>https://community.splunk.com/t5/Alerting/Problem-with-lookup-for-disabling-alerts-during-maintenance/m-p/395474#M6967</link>
      <description>&lt;P&gt;Do you want to put all the things in downtime?&lt;BR /&gt;
If you had only a few hosts in the lookup at any time, you could do something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search string NOT [|inputlookup hosts_in_maint.csv | table  host| format] 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Aug 2018 01:38:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Problem-with-lookup-for-disabling-alerts-during-maintenance/m-p/395474#M6967</guid>
      <dc:creator>nvanderwalt_spl</dc:creator>
      <dc:date>2018-08-09T01:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with lookup for disabling alerts during maintenance</title>
      <link>https://community.splunk.com/t5/Alerting/Problem-with-lookup-for-disabling-alerts-during-maintenance/m-p/395475#M6968</link>
      <description>&lt;P&gt;What are you looking up against i.e. what's matching criteria in search and lookup?&lt;BR /&gt;
Also in the above search if you want only those events which is not under maintenance , you should use&lt;/P&gt;

&lt;P&gt;| search UnderMaintenance="NO" &lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2018 01:43:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Problem-with-lookup-for-disabling-alerts-during-maintenance/m-p/395475#M6968</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-08-09T01:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with lookup for disabling alerts during maintenance</title>
      <link>https://community.splunk.com/t5/Alerting/Problem-with-lookup-for-disabling-alerts-during-maintenance/m-p/395476#M6969</link>
      <description>&lt;P&gt;I am sorry I wasn't clear.  I want it to function as a simple on/off.  If maintenance is ON, don't run the search.  If maintenance is off, run it normally.&lt;/P&gt;

&lt;P&gt;Thanks for your input.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2018 01:45:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Problem-with-lookup-for-disabling-alerts-during-maintenance/m-p/395476#M6969</guid>
      <dc:creator>jmoeller</dc:creator>
      <dc:date>2018-08-09T01:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with lookup for disabling alerts during maintenance</title>
      <link>https://community.splunk.com/t5/Alerting/Problem-with-lookup-for-disabling-alerts-during-maintenance/m-p/395477#M6970</link>
      <description>&lt;OL&gt;
&lt;LI&gt;The Inputlookup command supports where condition which means the better way to filter down the search will be &lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;| inputlookup StandardMaintenance WHERE UnderMaintenance="Yes"&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;What columns do you expect out of the lookup and added in the filter in base search? Ex - If it is to find the list of Hosts that are not under maintenance and consider them for alerting, sample query can be - &lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;index=os sourcetype=vmstat NOT [ | inputlookup StandardMaintenance WHERE UnderMaintenance="Yes" | fields host | table host ]&lt;BR /&gt;
| fields memUsedPct, host &lt;BR /&gt;
| stats avg(memUsedPct) as avgMemUsed by host &lt;BR /&gt;
| where avgMemUsed &amp;gt; 75&lt;BR /&gt;
| table host&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2018 02:15:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Problem-with-lookup-for-disabling-alerts-during-maintenance/m-p/395477#M6970</guid>
      <dc:creator>fferozbasha</dc:creator>
      <dc:date>2018-08-09T02:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with lookup for disabling alerts during maintenance</title>
      <link>https://community.splunk.com/t5/Alerting/Problem-with-lookup-for-disabling-alerts-during-maintenance/m-p/395478#M6971</link>
      <description>&lt;P&gt;Thanks.  I have no additional information in the StandardMaintenance table.  I simply want to use the table as a check... If UnderMaintainance is NO, execute query (thus generate an alert).&lt;/P&gt;

&lt;P&gt;To use your example, I want to run the index=os sourcetype=vmstat query only when UnderMaintainence is "NO"&lt;/P&gt;

&lt;P&gt;I know I should be able to deduce it from what you provided, but I am still struggling.  Any additional input is appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2018 13:13:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Problem-with-lookup-for-disabling-alerts-during-maintenance/m-p/395478#M6971</guid>
      <dc:creator>jmoeller</dc:creator>
      <dc:date>2018-08-09T13:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with lookup for disabling alerts during maintenance</title>
      <link>https://community.splunk.com/t5/Alerting/Problem-with-lookup-for-disabling-alerts-during-maintenance/m-p/395479#M6972</link>
      <description>&lt;P&gt;The query that i have provided should do the same. It will run search a Index=os ONLY if there any hosts tagged as UnderMaintenance=Yes. &lt;/P&gt;</description>
      <pubDate>Sat, 11 Aug 2018 00:51:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Problem-with-lookup-for-disabling-alerts-during-maintenance/m-p/395479#M6972</guid>
      <dc:creator>fferozbasha</dc:creator>
      <dc:date>2018-08-11T00:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with lookup for disabling alerts during maintenance</title>
      <link>https://community.splunk.com/t5/Alerting/Problem-with-lookup-for-disabling-alerts-during-maintenance/m-p/395480#M6973</link>
      <description>&lt;P&gt;Thanks for the response.  The CVS file only consists of the one field.  I want maintenance to be either on or off.  If off, run query, if on, don't run query.  I am not marking individual hosts, it is all or nothing.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 11 Aug 2018 01:02:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Problem-with-lookup-for-disabling-alerts-during-maintenance/m-p/395480#M6973</guid>
      <dc:creator>jmoeller</dc:creator>
      <dc:date>2018-08-11T01:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with lookup for disabling alerts during maintenance</title>
      <link>https://community.splunk.com/t5/Alerting/Problem-with-lookup-for-disabling-alerts-during-maintenance/m-p/395481#M6974</link>
      <description>&lt;P&gt;| lookup StandardMaintenance.csv UnderMaintenance &lt;BR /&gt;
| where UnderMaintenance="NO"&lt;/P&gt;

&lt;P&gt;fields values you use after where are the case sensitive, &lt;/P&gt;</description>
      <pubDate>Sat, 11 Aug 2018 13:47:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Problem-with-lookup-for-disabling-alerts-during-maintenance/m-p/395481#M6974</guid>
      <dc:creator>nagarjuna559</dc:creator>
      <dc:date>2018-08-11T13:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with lookup for disabling alerts during maintenance</title>
      <link>https://community.splunk.com/t5/Alerting/Problem-with-lookup-for-disabling-alerts-during-maintenance/m-p/395482#M6975</link>
      <description>&lt;P&gt;| lookup StandardMaintenance.csv&lt;BR /&gt;&lt;BR /&gt;
| where UnderMaintenance="NO"&lt;/P&gt;</description>
      <pubDate>Sat, 11 Aug 2018 13:49:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Problem-with-lookup-for-disabling-alerts-during-maintenance/m-p/395482#M6975</guid>
      <dc:creator>nagarjuna559</dc:creator>
      <dc:date>2018-08-11T13:49:20Z</dc:date>
    </item>
  </channel>
</rss>

