<?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 in multiple indexes in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-in-multiple-indexes/m-p/139456#M38330</link>
    <description>&lt;P&gt;Thanks somesoni2, I will test and reply in soon.&lt;/P&gt;</description>
    <pubDate>Tue, 12 Nov 2013 21:30:59 GMT</pubDate>
    <dc:creator>rafamss</dc:creator>
    <dc:date>2013-11-12T21:30:59Z</dc:date>
    <item>
      <title>Search in multiple indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-in-multiple-indexes/m-p/139454#M38328</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;

&lt;P&gt;I need some help.&lt;/P&gt;

&lt;P&gt;I have 2 index, and in both there are the field "ip", How can I create a search that find only results which exists the in both ? Like a join in SQL.&lt;/P&gt;

&lt;P&gt;Like this: index1= indexX AND index2=indexY | stats count by ip&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2013 20:47:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-in-multiple-indexes/m-p/139454#M38328</guid>
      <dc:creator>rafamss</dc:creator>
      <dc:date>2013-11-12T20:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: Search in multiple indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-in-multiple-indexes/m-p/139455#M38329</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=indexX |stats count by ip | join ip [search index=indexY | stats count by ip]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=indexX | table ip | join ip [search index=indexY |table ip] | stats count by ip
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Nov 2013 21:05:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-in-multiple-indexes/m-p/139455#M38329</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2013-11-12T21:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: Search in multiple indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-in-multiple-indexes/m-p/139456#M38330</link>
      <description>&lt;P&gt;Thanks somesoni2, I will test and reply in soon.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2013 21:30:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-in-multiple-indexes/m-p/139456#M38330</guid>
      <dc:creator>rafamss</dc:creator>
      <dc:date>2013-11-12T21:30:59Z</dc:date>
    </item>
    <item>
      <title>Re: Search in multiple indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-in-multiple-indexes/m-p/139457#M38331</link>
      <description>&lt;P&gt;Thanks somesoni2, it's worked perfectly.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2013 19:10:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-in-multiple-indexes/m-p/139457#M38331</guid>
      <dc:creator>rafamss</dc:creator>
      <dc:date>2013-11-18T19:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: Search in multiple indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-in-multiple-indexes/m-p/139458#M38332</link>
      <description>&lt;P&gt;Any chance that this can only be done in later versions of Splunk? I am currently on 4.3.3 using Enterprise Security on 2.0.2. When I search for this: index=indexa sourcetype=sourcea [search index=indexb sourcetype=sourceb] The search is forever ongoing even though I am only searching for the past 5 minutes.&lt;/P&gt;

&lt;P&gt;When I search for this: index=indexa OR index=indexb source=sourceb It works but it will not return the results I require.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Nov 2014 03:58:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-in-multiple-indexes/m-p/139458#M38332</guid>
      <dc:creator>isaacyeo</dc:creator>
      <dc:date>2014-11-19T03:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: Search in multiple indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-in-multiple-indexes/m-p/139459#M38333</link>
      <description>&lt;P&gt;Hi &lt;/P&gt;

&lt;P&gt;How would the query look if i have more that 10 index's to search for?&lt;/P&gt;

&lt;P&gt;Kishore&lt;/P&gt;</description>
      <pubDate>Wed, 25 Feb 2015 10:35:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-in-multiple-indexes/m-p/139459#M38333</guid>
      <dc:creator>Kishorebk</dc:creator>
      <dc:date>2015-02-25T10:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: Search in multiple indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-in-multiple-indexes/m-p/139460#M38334</link>
      <description>&lt;P&gt;@rafamss @somesoni2 @Kishorebk - I'd recommend you try the OR Statement, You were close on the question, but instead of AND, you can use the OR.&lt;/P&gt;

&lt;P&gt;e.g.&lt;/P&gt;

&lt;P&gt;index=index1 OR index=index2 OR index=index3&lt;/P&gt;

&lt;P&gt;etc.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Feb 2015 10:40:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-in-multiple-indexes/m-p/139460#M38334</guid>
      <dc:creator>markthompson</dc:creator>
      <dc:date>2015-02-25T10:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: Search in multiple indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-in-multiple-indexes/m-p/139461#M38335</link>
      <description>&lt;P&gt;Hi Mark&lt;/P&gt;

&lt;P&gt;I tried, it gives results, but just for one index at time.&lt;BR /&gt;
Here is the query 0&lt;/P&gt;

&lt;P&gt;index=XXXX OR XXXX OR XXXXX OR XXXXX OR XXXXX OR XXXXX OR XXXXX OR XXXXX OR XXXXX OR XXXXX OR XXXXX OR | rex"(?[\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}][^,]+)" | rename XX_1 as IP | rename XX_2 as IP | rename XX_3 as IP | rex "\W+\s+(?\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}[^s+\W+\s+])" | rex "coming\s+from\s+(?\d*\D*\w*)" | rex "XXX\s+XXX\s+(?\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3})" | rex "\W(?\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}[^,])" | rename IPAddress as IP | rename XX_4 as IP | iplocation IP | stats count values(index) by Country&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 19:03:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-in-multiple-indexes/m-p/139461#M38335</guid>
      <dc:creator>Kishorebk</dc:creator>
      <dc:date>2020-09-28T19:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: Search in multiple indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-in-multiple-indexes/m-p/139462#M38336</link>
      <description>&lt;P&gt;Hi Mark&lt;/P&gt;

&lt;P&gt;I tried, it gives results, but just for one index at time.&lt;BR /&gt;
Here is the query 0&lt;/P&gt;

&lt;P&gt;index=XXXX OR XXXX OR XXXXX OR XXXXX OR XXXXX OR XXXXX OR XXXXX OR XXXXX OR XXXXX OR XXXXX OR XXXXX OR | rex"(?[\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}][^,]+)" | rename XX_1 as IP | rename XX_2 as IP | rename XX_3 as IP | rex "W+s+(?d{1,3}.d{1,3}.d{1,3}.d{1,3}[^s+W+s+])" | rex "comings+froms+(?d*D*w*)" | rex "XXXs+XXXs+(?d{1,3}.d{1,3}.d{1,3}.d{1,3})" | rex "W(?d{1,3}.d{1,3}.d{1,3}.d{1,3}[^,])" | rename IPAddress as IP | rename XX_4 as IP | iplocation IP | stats count values(index) by Country&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 19:03:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-in-multiple-indexes/m-p/139462#M38336</guid>
      <dc:creator>Kishorebk</dc:creator>
      <dc:date>2020-09-28T19:03:05Z</dc:date>
    </item>
  </channel>
</rss>

