<?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 use a lookup file to suppress alerts? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-file-to-suppress-alerts/m-p/203315#M59081</link>
    <description>&lt;P&gt;It does work with or without the initial pipe.  The inputlookup on regular search needs a pipe, so I got the habit of putting that anyways. &lt;/P&gt;</description>
    <pubDate>Thu, 03 Sep 2015 15:04:36 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2015-09-03T15:04:36Z</dc:date>
    <item>
      <title>How to use a lookup file to suppress alerts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-file-to-suppress-alerts/m-p/203306#M59072</link>
      <description>&lt;P&gt;We have a network load balancer (NLB) that generates syslog messages when servers fail to respond to health probes from the NLB. The message looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; Sep 1 20:20:22 HostA VirtualContextA: %ACE-3-251008: Health probe failed for server 10.10.10.10 on port 443...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have a field extraction that pulls out the IP address and port number and creates the fields &lt;STRONG&gt;server_address&lt;/STRONG&gt; and &lt;STRONG&gt;port&lt;/STRONG&gt;. I would like to generate alerts (emails) when these messages are seen. However, I do not want the alerts to be generated if the servers are undergoing maintenance. I have a CSV file (inmaint.csv) that has a list of servers that are undergoing maintenance. The CSV file has the columns 'IP_address' and 'Caption' where 'Caption' is the server name.&lt;/P&gt;

&lt;P&gt;My base search is:  &lt;CODE&gt;index=network "Health probe failed for server"&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;How do I add a lookup to this search to check the CSV file and determine whether a server is in maintenance? &lt;BR /&gt;
Effectively, I want to suppress alerting for servers that are in the CSV file.&lt;/P&gt;

&lt;P&gt;"If &lt;STRONG&gt;server_address&lt;/STRONG&gt; is present in the lookup file, don't alert."&lt;/P&gt;

&lt;P&gt;I'm quite confused about when to use lookup, inputlookup, subsearch, etc. I know WHAT I want to achieve, but can't figure out HOW. Please let me know if any of it's unclear.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2015 00:49:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-file-to-suppress-alerts/m-p/203306#M59072</guid>
      <dc:creator>mjshoaf</dc:creator>
      <dc:date>2015-09-02T00:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a lookup file to suppress alerts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-file-to-suppress-alerts/m-p/203307#M59073</link>
      <description>&lt;P&gt;Assuming that both your data and the lookup have the same field name for the ip try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=network "Health probe failed for server" | append [|inputlookup my_lookupfile.csv ] | stats count by ip | where count = 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If the field names are different just use &lt;CODE&gt;|rename&lt;/CODE&gt; Command to rename one of the fields to be the same as the other.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2015 02:31:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-file-to-suppress-alerts/m-p/203307#M59073</guid>
      <dc:creator>diogofgm</dc:creator>
      <dc:date>2015-09-02T02:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a lookup file to suppress alerts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-file-to-suppress-alerts/m-p/203308#M59074</link>
      <description>&lt;P&gt;Hi mjshoaf,&lt;/P&gt;

&lt;P&gt;take a look at this answer &lt;A href="http://answers.splunk.com/answers/289318/how-do-i-disable-monitoring-on-a-server-for-a-cert.html"&gt;http://answers.splunk.com/answers/289318/how-do-i-disable-monitoring-on-a-server-for-a-cert.html&lt;/A&gt; , it gives various methods to achieve what you want.&lt;/P&gt;

&lt;P&gt;Hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2015 02:37:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-file-to-suppress-alerts/m-p/203308#M59074</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-09-02T02:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a lookup file to suppress alerts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-file-to-suppress-alerts/m-p/203309#M59075</link>
      <description>&lt;P&gt;I don't understand what 'append' does. It seems like that would add results to my original results. I want to filter my original results and end up with a subset (i.e., just the ones that appy to servers that are not undergoing maintenance).&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2015 12:45:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-file-to-suppress-alerts/m-p/203309#M59075</guid>
      <dc:creator>mjshoaf</dc:creator>
      <dc:date>2015-09-02T12:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a lookup file to suppress alerts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-file-to-suppress-alerts/m-p/203310#M59076</link>
      <description>&lt;P&gt;Yeah, this is the right idea, but my CSV is based on the results of a lookup to an external database. I can't control what columns are present in the CSV. My search simply needs to be able to check for the presence of &lt;STRONG&gt;server_address&lt;/STRONG&gt; in the CSV.&lt;/P&gt;

&lt;P&gt;If &lt;STRONG&gt;server_address&lt;/STRONG&gt; is present in the CSV, don't alert. Otherwise, alert.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2015 12:47:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-file-to-suppress-alerts/m-p/203310#M59076</guid>
      <dc:creator>mjshoaf</dc:creator>
      <dc:date>2015-09-02T12:47:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a lookup file to suppress alerts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-file-to-suppress-alerts/m-p/203311#M59077</link>
      <description>&lt;P&gt;Try this :&lt;/P&gt;

&lt;P&gt;your base search | search NOT [ | inputcsv yourcsvholdingserver_address.csv | table server_address ] | ...&lt;/P&gt;

&lt;P&gt;This must be done in all your alerts or set it up as automatic lookup which will result in a new field (maybe call it &lt;CODE&gt;alerts=disabled&lt;/CODE&gt;) and you can use it in your alerts like &lt;CODE&gt;your base search NOT alert=disabled | ...&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I hope this makes some sense ...&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 07:10:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-file-to-suppress-alerts/m-p/203311#M59077</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2020-09-29T07:10:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a lookup file to suppress alerts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-file-to-suppress-alerts/m-p/203312#M59078</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Updated the extra punctuations&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=network "Health probe failed for server" NOT [|inputlookup inmaint.csv | table  IP_address | rename IP_address as server_address ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will take all the IP_address present in the lookup, (rename it as server_address) and exclude them from your base search, so you'll not be alerted on the same.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 07:10:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-file-to-suppress-alerts/m-p/203312#M59078</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2020-09-29T07:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a lookup file to suppress alerts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-file-to-suppress-alerts/m-p/203313#M59079</link>
      <description>&lt;P&gt;Yes, thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2015 13:29:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-file-to-suppress-alerts/m-p/203313#M59079</guid>
      <dc:creator>mjshoaf</dc:creator>
      <dc:date>2015-09-03T13:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a lookup file to suppress alerts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-file-to-suppress-alerts/m-p/203314#M59080</link>
      <description>&lt;P&gt;Fantastic! This achieves the goal. I just had to remove the odd punctuation so it looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=network "Health probe failed for server" NOT [|inputlookup inmaint.csv | table  IP_address | rename IP_address as server_address]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Question: Does the initial '|' in the sub-search serve a purpose? It seems to work with or without it?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2015 14:10:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-file-to-suppress-alerts/m-p/203314#M59080</guid>
      <dc:creator>mjshoaf</dc:creator>
      <dc:date>2015-09-03T14:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a lookup file to suppress alerts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-file-to-suppress-alerts/m-p/203315#M59081</link>
      <description>&lt;P&gt;It does work with or without the initial pipe.  The inputlookup on regular search needs a pipe, so I got the habit of putting that anyways. &lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2015 15:04:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-file-to-suppress-alerts/m-p/203315#M59081</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-09-03T15:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a lookup file to suppress alerts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-file-to-suppress-alerts/m-p/203316#M59082</link>
      <description>&lt;P&gt;This one was simple conceptually, but I was really having a hard time with the syntax. Thank you very much for the assist with this!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2015 15:14:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-file-to-suppress-alerts/m-p/203316#M59082</guid>
      <dc:creator>mjshoaf</dc:creator>
      <dc:date>2015-09-03T15:14:22Z</dc:date>
    </item>
  </channel>
</rss>

