<?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 internal ips from a lookup file in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-exclude-internal-ips-from-a-lookup-file/m-p/139946#M97874</link>
    <description>&lt;P&gt;Great, don't forget to mark this as solved.&lt;/P&gt;</description>
    <pubDate>Sun, 13 Jul 2014 12:34:23 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2014-07-13T12:34:23Z</dc:date>
    <item>
      <title>How to exclude internal ips from a lookup file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-exclude-internal-ips-from-a-lookup-file/m-p/139943#M97871</link>
      <description>&lt;P&gt;|&lt;STRONG&gt;inputlookup internal_ip.csv&lt;/STRONG&gt; gives me list of all internal IP's. I need to exclude these IP's in my below search query:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;index=test_web  | rex field=targetfile "(/[^/]+){1}/(?P&lt;FILENAME&gt;.*)"  | where (sourcetype="access_combined" AND like(filename,"%tar")  AND (method="GET" OR method="HEAD")) OR (sourcetype="owncloud") | eval username=ifnull(username,user,username) | rename filename as "TAR Name" | lookup owncloudpackages.csv "TAR Name" output "Product Name" | rename "Product Name" as productname | transaction clientip  username maxevents=-1 maxpause=3600 | eval productnames=replace(productname,"SWname 7", "SW 7") | stats count(duration) as Downloads by productnames | where Downloads &amp;gt; 1 | sort -Downloads | rename Downloads as "Product Downloads" | rename productnames as "Product Names"&lt;/FILENAME&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:03:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-exclude-internal-ips-from-a-lookup-file/m-p/139943#M97871</guid>
      <dc:creator>webnair</dc:creator>
      <dc:date>2020-09-28T17:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude internal ips from a lookup file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-exclude-internal-ips-from-a-lookup-file/m-p/139944#M97872</link>
      <description>&lt;P&gt;You could do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=test_web NOT [inputlookup internal_ip.csv | rename ip_field_from_lookup as clientip | fields clientip | dedup clientip] | ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Different topic, the search seems convoluted in places...&lt;BR /&gt;
Does that index only contain those two sourcetypes? If not, you should add &lt;CODE&gt;sourcetype=access_combined OR sourcetype=owncloud&lt;/CODE&gt; to the base search to boost performance.&lt;BR /&gt;
You can incorporate both &lt;CODE&gt;rename&lt;/CODE&gt; calls into the &lt;CODE&gt;lookup&lt;/CODE&gt; by using the &lt;CODE&gt;as&lt;/CODE&gt; keyword.&lt;BR /&gt;
You can also replace &lt;CODE&gt;if(isnull(A),B,A)&lt;/CODE&gt; by &lt;CODE&gt;coalesce(A,B)&lt;/CODE&gt; - this takes more than two fields as well, in case you have huge &lt;CODE&gt;if(isnull(),,)&lt;/CODE&gt;-trees.&lt;/P&gt;</description>
      <pubDate>Sat, 12 Jul 2014 08:25:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-exclude-internal-ips-from-a-lookup-file/m-p/139944#M97872</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-07-12T08:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude internal ips from a lookup file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-exclude-internal-ips-from-a-lookup-file/m-p/139945#M97873</link>
      <description>&lt;P&gt;Thanks a bunch.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Jul 2014 07:41:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-exclude-internal-ips-from-a-lookup-file/m-p/139945#M97873</guid>
      <dc:creator>webnair</dc:creator>
      <dc:date>2014-07-13T07:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude internal ips from a lookup file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-exclude-internal-ips-from-a-lookup-file/m-p/139946#M97874</link>
      <description>&lt;P&gt;Great, don't forget to mark this as solved.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Jul 2014 12:34:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-exclude-internal-ips-from-a-lookup-file/m-p/139946#M97874</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-07-13T12:34:23Z</dc:date>
    </item>
  </channel>
</rss>

