<?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: Search incorporating inputlookup in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-incorporating-inputlookup/m-p/547693#M155315</link>
    <description>&lt;P&gt;Try this one out:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=firewall src_ip!="192.168.0.0/16" 
| fields src_ip 
[| inputlookup RYUK.csv | stats values(src_ip) AS search | format ] 
| stats count by src_ip&lt;/LI-CODE&gt;&lt;P&gt;Similar to the linked reply below. Does that get you what you need? Hope this helped!&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.splunk.com/t5/Getting-Data-In/Search-for-all-events-for-IP-address-within-a-CSV-file/td-p/288181" target="_blank"&gt;Solved: Search for all events for IP address within a CSV ... - Splunk Community&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 13 Apr 2021 00:09:17 GMT</pubDate>
    <dc:creator>96nick</dc:creator>
    <dc:date>2021-04-13T00:09:17Z</dc:date>
    <item>
      <title>Search incorporating inputlookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-incorporating-inputlookup/m-p/547692#M155314</link>
      <description>&lt;P&gt;I have a list of source ip addresses in a csv file loaded into Splunk as a lookup file.&amp;nbsp; The file has a single field, src_ip, and about 4000 rows of unique ip address.&lt;/P&gt;&lt;P&gt;I want to take the contents of the lookup file and compare each entry to a search of filewall logs and report the number of times each entry in the lookup file is present in the firewall data.&lt;/P&gt;&lt;P&gt;I have this so far but the src_ip listed in the result is not always present in the lookup file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="firewall" src_ip!="192.168.0.0/16"
| fields src_ip
| append
  [ | inputlookup RYUK.csv
  | fields src_ip]
| stats count by src_ip&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions greatly appreciated.&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;Leigh&lt;/P&gt;</description>
      <pubDate>Mon, 12 Apr 2021 23:58:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-incorporating-inputlookup/m-p/547692#M155314</guid>
      <dc:creator>balcv</dc:creator>
      <dc:date>2021-04-12T23:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: Search incorporating inputlookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-incorporating-inputlookup/m-p/547693#M155315</link>
      <description>&lt;P&gt;Try this one out:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=firewall src_ip!="192.168.0.0/16" 
| fields src_ip 
[| inputlookup RYUK.csv | stats values(src_ip) AS search | format ] 
| stats count by src_ip&lt;/LI-CODE&gt;&lt;P&gt;Similar to the linked reply below. Does that get you what you need? Hope this helped!&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.splunk.com/t5/Getting-Data-In/Search-for-all-events-for-IP-address-within-a-CSV-file/td-p/288181" target="_blank"&gt;Solved: Search for all events for IP address within a CSV ... - Splunk Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 00:09:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-incorporating-inputlookup/m-p/547693#M155315</guid>
      <dc:creator>96nick</dc:creator>
      <dc:date>2021-04-13T00:09:17Z</dc:date>
    </item>
    <item>
      <title>Re: Search incorporating inputlookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-incorporating-inputlookup/m-p/547694#M155316</link>
      <description>&lt;P&gt;That query takes all of the src_ip values found in the firewall index and adds to it all of the src_ip values from the RYUK lookup file.&amp;nbsp; The result is the union, rather than the intersection, of the two sets.&lt;/P&gt;&lt;P&gt;To get the intersection, use this query to tell Splunk to only pull events that contain a listed src_ip value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="firewall" src_ip!="192.168.0.0/16" [ | inputlookup RYUK.csv
  | return 1000 src_ip]
| stats count by src_ip&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The subsearch reads the lookup file and reformats it into a query string of the form "(src_ip=1.2.3.4 OR src_ip=1.2.3.5 OR src_ip=1.3.4.5 ...)"&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 13:05:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-incorporating-inputlookup/m-p/547694#M155316</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-04-15T13:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: Search incorporating inputlookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-incorporating-inputlookup/m-p/547698#M155319</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp; That appears to have done the trick but I'll need to wait until I have data that matches, but I think it should be fine.&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;Leigh&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 01:29:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-incorporating-inputlookup/m-p/547698#M155319</guid>
      <dc:creator>balcv</dc:creator>
      <dc:date>2021-04-13T01:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: Search incorporating inputlookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-incorporating-inputlookup/m-p/547961#M155381</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt; .&amp;nbsp; Having had this running for a couple of days, it would appear that this search only takes the first address in the lookup file.&amp;nbsp; I tested this by manually adding addresses I knew were valid and each time it only ever returned a count for the first address in the file and a count of that address.&lt;/P&gt;&lt;P&gt;It did not move through the entire lookup file.&lt;/P&gt;&lt;P&gt;Cheers&lt;BR /&gt;Leigh&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 23:49:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-incorporating-inputlookup/m-p/547961#M155381</guid>
      <dc:creator>balcv</dc:creator>
      <dc:date>2021-04-14T23:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: Search incorporating inputlookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-incorporating-inputlookup/m-p/547962#M155382</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/32903"&gt;@96nick&lt;/a&gt; . Thanks for your repsonse.&lt;/P&gt;&lt;P&gt;This it not giving me exactly what I wanted.&amp;nbsp; It appears that it lists all the addresses found in the firewall log with a count rather than using the addresses in the lookup file.&lt;/P&gt;&lt;P&gt;I tested this by running the search then manually looking then up in the file lookup file and most did not exist in the file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to take each address in the lookup file, compare to the firewall data and give a count for the number of matches against that file.&lt;/P&gt;&lt;P&gt;Cheers&lt;BR /&gt;Leigh&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 23:51:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-incorporating-inputlookup/m-p/547962#M155382</guid>
      <dc:creator>balcv</dc:creator>
      <dc:date>2021-04-14T23:51:57Z</dc:date>
    </item>
    <item>
      <title>Re: Search incorporating inputlookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-incorporating-inputlookup/m-p/548014#M155402</link>
      <description>&lt;P&gt;You're right.&amp;nbsp; I left out an argument to the &lt;FONT face="courier new,courier"&gt;return&lt;/FONT&gt; command.&amp;nbsp; See the revised answer.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 13:05:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-incorporating-inputlookup/m-p/548014#M155402</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-04-15T13:05:59Z</dc:date>
    </item>
  </channel>
</rss>

