<?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: Using lookup in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Using-lookup/m-p/399724#M95146</link>
    <description>&lt;P&gt;Hey &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/164391"&gt;@chrispounds&lt;/a&gt;,&lt;/P&gt;

&lt;P&gt;This  &lt;CODE&gt;[inputlookup ip_list.csv|rename ip as src_ip | return 100 src_ip]&lt;/CODE&gt;  in the search above allows u to rename the field from the lookup to src_ip and will automatically filter on those IPs only. Try using  &lt;CODE&gt;[inputlookup ip_list.csv|rename ip as src_ip | return 100 src_ip]&lt;/CODE&gt; alone and see what it returns, it will be the list of IPs seperated by OR.&lt;/P&gt;

&lt;P&gt;If you want to enrich your data with the lookup then you can use something like this :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=firewall | lookup ip_list.csv ip AS src_ip
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 30 Sep 2020 00:45:48 GMT</pubDate>
    <dc:creator>DavidHourani</dc:creator>
    <dc:date>2020-09-30T00:45:48Z</dc:date>
    <item>
      <title>Using lookup</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Using-lookup/m-p/399718#M95140</link>
      <description>&lt;P&gt;Hi All, &lt;/P&gt;

&lt;P&gt;So i have a csv, which only contains one field "ip" with ips listed. &lt;/P&gt;

&lt;P&gt;I would like to inputlookup this csv into a search something like below&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=firewall src_ip=(list of ip's from csv) | *rest of search*&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;i know you have to do &lt;CODE&gt;[inputlookup ip_list.csv | fields ip]&lt;/CODE&gt; to get the csv loaded, i'm just not sure how to then adapt it to the original search criteria, could any of you smart people help?&lt;/P&gt;

&lt;P&gt;Many thanks,&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2019 11:41:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Using-lookup/m-p/399718#M95140</guid>
      <dc:creator>chrispounds</dc:creator>
      <dc:date>2019-05-30T11:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: Using lookup</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Using-lookup/m-p/399719#M95141</link>
      <description>&lt;P&gt;Hi @chrispounds,&lt;/P&gt;

&lt;P&gt;You're looking for something like this :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=firewall  [inputlookup ip_list.csv|rename ip as src_ip | return 100 src_ip] | rest of search
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Cheers,&lt;BR /&gt;
David&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2019 11:53:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Using-lookup/m-p/399719#M95141</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-05-30T11:53:06Z</dc:date>
    </item>
    <item>
      <title>Re: Using lookup</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Using-lookup/m-p/399720#M95142</link>
      <description>&lt;P&gt;I would recommend changing your csv to have two columns. For example "lookup_ip" and "lookup_reason". The second column could just contain a single value in each row that describes what the list is for (i.e. "my ip blacklist"). Then add the lookup to Splunk. For your search do:&lt;/P&gt;

&lt;P&gt;index=firewall &lt;BR /&gt;
| lookup ip_list.csv lookup_ip as src_ip&lt;/P&gt;

&lt;P&gt;In the results, if any event has a src_ip that matches the lookup list you'll see the "lookup_reason" field show up. So you'll have lookup_reason="my ip blacklist". This is a super easy way to pull lookup data in, then you can work it downstream in the search pipeline.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:44:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Using-lookup/m-p/399720#M95142</guid>
      <dc:creator>jgoodrich</dc:creator>
      <dc:date>2020-09-30T00:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: Using lookup</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Using-lookup/m-p/399721#M95143</link>
      <description>&lt;P&gt;For reference @chrispounds, this beautiful answer by @acharlieh at &lt;A href="https://answers.splunk.com/answers/390349/what-is-the-basic-difference-between-the-lookup-in.html"&gt;What is the basic difference between the lookup, inputlook and outputlookup commands&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2019 13:44:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Using-lookup/m-p/399721#M95143</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2019-05-30T13:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using lookup</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Using-lookup/m-p/399722#M95144</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/68181"&gt;@DavidHourani&lt;/a&gt; , &lt;/P&gt;

&lt;P&gt;So one of the interesting fields is src_ip already from the firewall log. How would i link the "ip" field from the ip_list.csv, to the actual field?&lt;/P&gt;

&lt;P&gt;In essence, using the "ip" field in the lookup as a list of IP's to look for like its an OR statement, does that make sense?&lt;/P&gt;

&lt;P&gt;Many thanks,&lt;BR /&gt;
Chris&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:45:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Using-lookup/m-p/399722#M95144</guid>
      <dc:creator>chrispounds</dc:creator>
      <dc:date>2020-09-30T00:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: Using lookup</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Using-lookup/m-p/399723#M95145</link>
      <description>&lt;P&gt;thanks @ddrillic  i'll definitely check that out! &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2019 14:42:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Using-lookup/m-p/399723#M95145</guid>
      <dc:creator>chrispounds</dc:creator>
      <dc:date>2019-05-30T14:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: Using lookup</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Using-lookup/m-p/399724#M95146</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/164391"&gt;@chrispounds&lt;/a&gt;,&lt;/P&gt;

&lt;P&gt;This  &lt;CODE&gt;[inputlookup ip_list.csv|rename ip as src_ip | return 100 src_ip]&lt;/CODE&gt;  in the search above allows u to rename the field from the lookup to src_ip and will automatically filter on those IPs only. Try using  &lt;CODE&gt;[inputlookup ip_list.csv|rename ip as src_ip | return 100 src_ip]&lt;/CODE&gt; alone and see what it returns, it will be the list of IPs seperated by OR.&lt;/P&gt;

&lt;P&gt;If you want to enrich your data with the lookup then you can use something like this :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=firewall | lookup ip_list.csv ip AS src_ip
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:45:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Using-lookup/m-p/399724#M95146</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2020-09-30T00:45:48Z</dc:date>
    </item>
  </channel>
</rss>

