<?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: What is the best way to exclude 2 or more countries from iplocation src_ip results? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-exclude-2-or-more-countries-from/m-p/275434#M83076</link>
    <description>&lt;P&gt;Thank you for suggestion, it is very good and I am making a note of it for future use.&lt;/P&gt;</description>
    <pubDate>Sun, 11 Dec 2016 16:34:00 GMT</pubDate>
    <dc:creator>packet_hunter</dc:creator>
    <dc:date>2016-12-11T16:34:00Z</dc:date>
    <item>
      <title>What is the best way to exclude 2 or more countries from iplocation src_ip results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-exclude-2-or-more-countries-from/m-p/275425#M83067</link>
      <description>&lt;P&gt;Let's say I want to look up IP location for all IPs by user, but I want to exclude 2 or more countries?  &lt;/P&gt;

&lt;P&gt;For example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...| iplocation src_ip | search Country!="India" AND Country!="Canada" AND Country!="United Kingdom" |stats values(Country) values(Region) values(City) values(src_ip) by user
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is there a better way to exclude countries other than  &lt;CODE&gt;Country!=&lt;/CODE&gt; ....  ?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2016 22:37:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-exclude-2-or-more-countries-from/m-p/275425#M83067</guid>
      <dc:creator>packet_hunter</dc:creator>
      <dc:date>2016-12-08T22:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to exclude 2 or more countries from iplocation src_ip results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-exclude-2-or-more-countries-from/m-p/275426#M83068</link>
      <description>&lt;P&gt;maybe &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  | search NOT (Country=India OR Country=Canada OR Country="United Kingdom")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Dec 2016 22:53:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-exclude-2-or-more-countries-from/m-p/275426#M83068</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-12-08T22:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to exclude 2 or more countries from iplocation src_ip results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-exclude-2-or-more-countries-from/m-p/275427#M83069</link>
      <description>&lt;P&gt;Thank you for the reply.   By writing it this way, is NOT better than !=  in terms of search performance?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2016 22:56:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-exclude-2-or-more-countries-from/m-p/275427#M83069</guid>
      <dc:creator>packet_hunter</dc:creator>
      <dc:date>2016-12-08T22:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to exclude 2 or more countries from iplocation src_ip results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-exclude-2-or-more-countries-from/m-p/275428#M83070</link>
      <description>&lt;P&gt;I don't think there is any performance different between those two methods (!= versus NOT). The only difference is when you use NOT to filter, it'll also keep the results where Country=null, whereas != will exclude them.&lt;/P&gt;

&lt;P&gt;Do you see any performance issue in your query? The field Country is available after iplocation command and you're filtering right after that so I don't see any improvement there.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2016 23:23:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-exclude-2-or-more-countries-from/m-p/275428#M83070</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-12-08T23:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to exclude 2 or more countries from iplocation src_ip results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-exclude-2-or-more-countries-from/m-p/275429#M83071</link>
      <description>&lt;P&gt;That is what I was thinking.&lt;BR /&gt;
I just wanted to get some opinions on exclusion as I have heard that searching for NOT or != slows down searches.&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2016 14:10:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-exclude-2-or-more-countries-from/m-p/275429#M83071</guid>
      <dc:creator>packet_hunter</dc:creator>
      <dc:date>2016-12-09T14:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to exclude 2 or more countries from iplocation src_ip results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-exclude-2-or-more-countries-from/m-p/275430#M83072</link>
      <description>&lt;P&gt;just have to convert to an answer for points, thankx&lt;/P&gt;</description>
      <pubDate>Sat, 10 Dec 2016 15:11:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-exclude-2-or-more-countries-from/m-p/275430#M83072</guid>
      <dc:creator>packet_hunter</dc:creator>
      <dc:date>2016-12-10T15:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to exclude 2 or more countries from iplocation src_ip results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-exclude-2-or-more-countries-from/m-p/275431#M83073</link>
      <description>&lt;P&gt;@packet_hunter ... You can run both searches and compare in job inspector for performance. Only recommendation is that Inclusion is better than Exclusion also filtering upfront in the query is better than filtering later on. However, both in your case are not feasible so just check for performance.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Dec 2016 17:08:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-exclude-2-or-more-countries-from/m-p/275431#M83073</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2016-12-10T17:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to exclude 2 or more countries from iplocation src_ip results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-exclude-2-or-more-countries-from/m-p/275432#M83074</link>
      <description>&lt;P&gt;thank you all for the replies!  Niketnilay please convert your comment to answer and I will accept.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Dec 2016 18:45:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-exclude-2-or-more-countries-from/m-p/275432#M83074</guid>
      <dc:creator>packet_hunter</dc:creator>
      <dc:date>2016-12-10T18:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to exclude 2 or more countries from iplocation src_ip results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-exclude-2-or-more-countries-from/m-p/275433#M83075</link>
      <description>&lt;P&gt;Hi packet_hunter,&lt;BR /&gt;
the better way to dinamically manage exclusions in a search or to manage many exclusions at the same time is to put them in a lookup and exclude results from your search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ...| iplocation src_ip | search NOT [ | inputlookup exclusions.csv | fields Country] |stats values(Country) values(Region) values(City) values(src_ip) by user
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In this way if you need to modify exclusions list you don't need to modify all you searches, but only lookup, and you search is slimmer.&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;

&lt;P&gt;bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Sun, 11 Dec 2016 09:17:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-exclude-2-or-more-countries-from/m-p/275433#M83075</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2016-12-11T09:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to exclude 2 or more countries from iplocation src_ip results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-exclude-2-or-more-countries-from/m-p/275434#M83076</link>
      <description>&lt;P&gt;Thank you for suggestion, it is very good and I am making a note of it for future use.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Dec 2016 16:34:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-exclude-2-or-more-countries-from/m-p/275434#M83076</guid>
      <dc:creator>packet_hunter</dc:creator>
      <dc:date>2016-12-11T16:34:00Z</dc:date>
    </item>
  </channel>
</rss>

