<?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 do I get a Splunk conditional lookup command to match only specific values? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-a-Splunk-conditional-lookup-command-to-match-only/m-p/419332#M120571</link>
    <description>&lt;P&gt;I'll be the first to say this.. Your query is going to be painfully slow and will not scale, especially with firewall logs. &lt;/P&gt;

&lt;P&gt;Instead, you should lump all 3 sources together like this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=firewall sourcetype=...) OR (index=...) 
| stats count by srcip
| lookup 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Also, rather than using &lt;CODE&gt;table&lt;/CODE&gt;, you should use a &lt;CODE&gt;stats&lt;/CODE&gt; before the lookup for better performance&lt;/P&gt;</description>
    <pubDate>Tue, 04 Dec 2018 16:19:42 GMT</pubDate>
    <dc:creator>skoelpin</dc:creator>
    <dc:date>2018-12-04T16:19:42Z</dc:date>
    <item>
      <title>How do I get a Splunk conditional lookup command to match only specific values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-a-Splunk-conditional-lookup-command-to-match-only/m-p/419331#M120570</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;My search is based on 3 sources (firewall log, ioc feed macro and lookup table for ioc). To check for any match on ioc for the destip field.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=firewall
| search [&amp;lt;macro&amp;gt;
| table destip
| format]
| lookup &amp;lt;lookup table&amp;gt; srcip as destip OUTPUT columnA as A
| lookup &amp;lt;lookup table&amp;gt; srcip as destip OUTPUT columnB as B
| table _time, destip, A, B
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, 1 ioc can have multiple row of data in the  for column B:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;destip-B
1.1.1.1-high&amp;nbsp; 
1.1.1.1-low
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hence, the result of the above SPL will give me:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;_time-destip-A-B
&amp;lt;time&amp;gt;-1.1.1.1-&amp;lt;output A&amp;gt;-high low
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How do i include a condition to only lookup and match the ioc for only "high" events in column B in the lookup table, to be as below ouput?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;_time-destip-A-B
&amp;lt;time&amp;gt;-1.1.1.1-&amp;lt;output A&amp;gt;-high
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Dec 2018 15:39:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-a-Splunk-conditional-lookup-command-to-match-only/m-p/419331#M120570</guid>
      <dc:creator>SplunkNewbie18</dc:creator>
      <dc:date>2018-12-04T15:39:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get a Splunk conditional lookup command to match only specific values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-a-Splunk-conditional-lookup-command-to-match-only/m-p/419332#M120571</link>
      <description>&lt;P&gt;I'll be the first to say this.. Your query is going to be painfully slow and will not scale, especially with firewall logs. &lt;/P&gt;

&lt;P&gt;Instead, you should lump all 3 sources together like this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=firewall sourcetype=...) OR (index=...) 
| stats count by srcip
| lookup 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Also, rather than using &lt;CODE&gt;table&lt;/CODE&gt;, you should use a &lt;CODE&gt;stats&lt;/CODE&gt; before the lookup for better performance&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 16:19:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-a-Splunk-conditional-lookup-command-to-match-only/m-p/419332#M120571</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2018-12-04T16:19:42Z</dc:date>
    </item>
  </channel>
</rss>

