<?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: Lookup returns all events in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Lookup-returns-all-events/m-p/544351#M154184</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;. I was a little confused between the usage of lookup and inputlookup. Your answer and this post&amp;nbsp;&lt;A href="https://community.splunk.com/t5/Archive/What-is-the-basic-difference-between-the-lookup-inputlook-and/m-p/286849" target="_self"&gt;here&lt;/A&gt;&amp;nbsp;cleared it up.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Also appreciate you pointing out the tip about using the 'index' field.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you !&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Mar 2021 15:40:29 GMT</pubDate>
    <dc:creator>ankit</dc:creator>
    <dc:date>2021-03-18T15:40:29Z</dc:date>
    <item>
      <title>Lookup returns all events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-returns-all-events/m-p/544238#M154161</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;BR /&gt;I'm a beginner at Splunk and am running into a problem with lookups. I have indexed IIS data in one sourcetype called 'iis' and uploaded a lookup csv called 'cve-ip'&amp;nbsp; which is defined already.&lt;BR /&gt;&lt;BR /&gt;Trying to corelate and find matches for the 'src_ip' column in the 'cve-ip' file with the 'c-ip' field in the 'iis' source type. Here is the SPL lookup I am running :&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;sourcetype=iis &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| lookup cve-ip src_ip AS c_ip&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This SPL is returning all events in the 'iis' sourcetype and not only those which match the values in the 'src_ip' column in the 'cve-ip' file. I would like some help figuring out why this is happening and returning all events as opposed to just matching events. Happy to provide any details as needed&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 16:45:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-returns-all-events/m-p/544238#M154161</guid>
      <dc:creator>ankit</dc:creator>
      <dc:date>2021-03-17T16:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup returns all events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-returns-all-events/m-p/544242#M154165</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/232611"&gt;@ankit&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;to filter events usimng a lookup you have to use the inputlookup command (&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.1.2/SearchReference/Inputlookup" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.1.2/SearchReference/Inputlookup&lt;/A&gt;), something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sourcetype=iis [ | inputlookup cve-ip | rename src_ip AS c_ip | fields c_ip ]
| ....&lt;/LI-CODE&gt;&lt;P&gt;Put attention that the field used for the filter must have the same name of the corrispondent in the main search.&lt;/P&gt;&lt;P&gt;You could also use the lookup command and it's useful if you need to use some additinal fields from the lookup, something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sourcetype=iis
| lookup cve-ip src_ip AS c_ip OUTPUT another_field
| where another_field=*
| ....&lt;/LI-CODE&gt;&lt;P&gt;But the first is prefereable because it's better to filter events as left as possible.&lt;/P&gt;&lt;P&gt;Only one additional hint: use always the index in your searches. they will be more performant!&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 16:53:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-returns-all-events/m-p/544242#M154165</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-03-17T16:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup returns all events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-returns-all-events/m-p/544351#M154184</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;. I was a little confused between the usage of lookup and inputlookup. Your answer and this post&amp;nbsp;&lt;A href="https://community.splunk.com/t5/Archive/What-is-the-basic-difference-between-the-lookup-inputlook-and/m-p/286849" target="_self"&gt;here&lt;/A&gt;&amp;nbsp;cleared it up.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Also appreciate you pointing out the tip about using the 'index' field.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you !&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2021 15:40:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-returns-all-events/m-p/544351#M154184</guid>
      <dc:creator>ankit</dc:creator>
      <dc:date>2021-03-18T15:40:29Z</dc:date>
    </item>
  </channel>
</rss>

