<?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: searching across multiple indexes with lookups in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/searching-across-multiple-indexes-with-lookups/m-p/354108#M164264</link>
    <description>&lt;P&gt;This will display dest_ip which are in Index 2 and then AND with index 1 dest_ip&lt;/P&gt;

&lt;P&gt;So this query works like this &lt;CODE&gt;index= index 1 AND dest_IP from Index 2&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 17:19:01 GMT</pubDate>
    <dc:creator>harsmarvania57</dc:creator>
    <dc:date>2020-09-29T17:19:01Z</dc:date>
    <item>
      <title>searching across multiple indexes with lookups</title>
      <link>https://community.splunk.com/t5/Splunk-Search/searching-across-multiple-indexes-with-lookups/m-p/354104#M164260</link>
      <description>&lt;P&gt;we have two indexes with some overlap in fields.  specifically IP addresses.  what I would like to is do an initial search dedup all the dest_ips then in the same search string use the deduped list of IPs as the filter on the second index.  Is this possible?   I would think some type of lookup table is the way to go.  &lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2017 16:17:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/searching-across-multiple-indexes-with-lookups/m-p/354104#M164260</guid>
      <dc:creator>caseysutherland</dc:creator>
      <dc:date>2017-12-20T16:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: searching across multiple indexes with lookups</title>
      <link>https://community.splunk.com/t5/Splunk-Search/searching-across-multiple-indexes-with-lookups/m-p/354105#M164261</link>
      <description>&lt;P&gt;It depends on the size of the result set and the frequency with which you'll run this. If you want to save the results of that first deduped query to use over and over, the lookup file would be a good way to go:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=first_index
| stats values(dest_ip) AS dest_ip
| outputlookup ip_list
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And then to use it in your subsequent searches:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=second_index 
[ | inputlookup ip_list 
  | stats values(dest_ip) AS dest_ip 
  | format ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If it's just an ad-hoc thing you want to run once, you are likely fine with a single subsearch:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=second_index
[ search index=first_index
  | stats values(dest_ip) AS dest_ip
  | format ]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Dec 2017 16:28:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/searching-across-multiple-indexes-with-lookups/m-p/354105#M164261</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2017-12-20T16:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: searching across multiple indexes with lookups</title>
      <link>https://community.splunk.com/t5/Splunk-Search/searching-across-multiple-indexes-with-lookups/m-p/354106#M164262</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Can you please try something like this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=&amp;lt;index 1&amp;gt; [search index=&amp;lt;index 2&amp;gt; | dedup dest_ip| return dest_ip]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Dec 2017 16:28:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/searching-across-multiple-indexes-with-lookups/m-p/354106#M164262</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2017-12-20T16:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: searching across multiple indexes with lookups</title>
      <link>https://community.splunk.com/t5/Splunk-Search/searching-across-multiple-indexes-with-lookups/m-p/354107#M164263</link>
      <description>&lt;P&gt;does this return all the events in index one that have a dest_ip that exists in the list of dest_ips returned from index 2?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:20:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/searching-across-multiple-indexes-with-lookups/m-p/354107#M164263</guid>
      <dc:creator>caseysutherland</dc:creator>
      <dc:date>2020-09-29T17:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: searching across multiple indexes with lookups</title>
      <link>https://community.splunk.com/t5/Splunk-Search/searching-across-multiple-indexes-with-lookups/m-p/354108#M164264</link>
      <description>&lt;P&gt;This will display dest_ip which are in Index 2 and then AND with index 1 dest_ip&lt;/P&gt;

&lt;P&gt;So this query works like this &lt;CODE&gt;index= index 1 AND dest_IP from Index 2&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:19:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/searching-across-multiple-indexes-with-lookups/m-p/354108#M164264</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2020-09-29T17:19:01Z</dc:date>
    </item>
  </channel>
</rss>

