<?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 to search and compare three indexes in one search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-and-compare-three-indexes-in-one-search/m-p/220017#M64677</link>
    <description>&lt;P&gt;try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=nitro_prod_comm_pci com.impl.AgnosticOmsTokenTranslator "Calling translate" | eval nsearch="search1" | append [ search index=nitro_prod_comm_pci com.impl.AgnosticOmsTokenTranslator "Message translation is successful" | eval nsearch="search2" ] | append [ search index="nitro_prod_comm_email" INFO EmailType=Order_Confirmation | eval nsearch="search3" ] | stats count by nsearch
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
    <pubDate>Wed, 10 Aug 2016 07:09:07 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2016-08-10T07:09:07Z</dc:date>
    <item>
      <title>How to search and compare three indexes in one search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-and-compare-three-indexes-in-one-search/m-p/220007#M64667</link>
      <description>&lt;P&gt;So I had an issue yesterday that was resolved, but ran into something similar that I cannot seem to find a solution to. I want my three indexes to display in one search.&lt;/P&gt;

&lt;P&gt;Here are the three indexes:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=nitro_prod_comm_pci com.impl.AgnosticOmsTokenTranslator "Calling translate"
index=nitro_prod_comm_pci com.impl.AgnosticOmsTokenTranslator "Message translation is successful"
index="nitro_prod_comm_email" INFO EmailType=Order_Confirmation 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Getting them to display by index worked when I had two different indexes, but because two of the searches have the same index, it no longer works:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=nitro_prod_comm_pci com.impl.AgnosticOmsTokenTranslator "Calling translate") OR (index="nitro_prod_comm_email" INFO EmailType=Order_Confirmation) earliest = -24h| stats count by index | replace nitro_prod_comm_pci with Calling_Translate, nitro_prod_comm_email with Email_Confirmed
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any solutions to get the three indexes to compare with each other?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2016 15:20:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-and-compare-three-indexes-in-one-search/m-p/220007#M64667</guid>
      <dc:creator>JoshuaJohn</dc:creator>
      <dc:date>2016-08-09T15:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to search and compare three indexes in one search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-and-compare-three-indexes-in-one-search/m-p/220008#M64668</link>
      <description>&lt;P&gt;You can use a sub-search, only drawback is that its slow &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=nitro_prod_comm_pci com.impl.AgnosticOmsTokenTranslator "Calling translate" [search index="nitro_prod_comm_email" INFO EmailType=Order_Confirmation) earliest = -24h| stats count by index | replace nitro_prod_comm_pci with Calling_Translate, nitro_prod_comm_email with Email_Confirmed]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Aug 2016 15:23:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-and-compare-three-indexes-in-one-search/m-p/220008#M64668</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2016-08-09T15:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to search and compare three indexes in one search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-and-compare-three-indexes-in-one-search/m-p/220009#M64669</link>
      <description>&lt;P&gt;Can you share samples from each index?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2016 15:25:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-and-compare-three-indexes-in-one-search/m-p/220009#M64669</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2016-08-09T15:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to search and compare three indexes in one search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-and-compare-three-indexes-in-one-search/m-p/220010#M64670</link>
      <description>&lt;P&gt;Using OR would work for that example, but I need ""Message translation is successful"" also which is why I cannot use the OR method or do stats count by index because the index is the same.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2016 15:34:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-and-compare-three-indexes-in-one-search/m-p/220010#M64670</guid>
      <dc:creator>JoshuaJohn</dc:creator>
      <dc:date>2016-08-09T15:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to search and compare three indexes in one search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-and-compare-three-indexes-in-one-search/m-p/220011#M64671</link>
      <description>&lt;P&gt;They each provide the number ~10,000, slightly different for each of them I wanted to compare the differences in a piechart&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2016 15:36:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-and-compare-three-indexes-in-one-search/m-p/220011#M64671</guid>
      <dc:creator>JoshuaJohn</dc:creator>
      <dc:date>2016-08-09T15:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to search and compare three indexes in one search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-and-compare-three-indexes-in-one-search/m-p/220012#M64672</link>
      <description>&lt;P&gt;I was wondering about field names.  If there is a field common to the 3 event types then that could be used in the query in place of &lt;CODE&gt;index&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2016 15:38:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-and-compare-three-indexes-in-one-search/m-p/220012#M64672</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2016-08-09T15:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to search and compare three indexes in one search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-and-compare-three-indexes-in-one-search/m-p/220013#M64673</link>
      <description>&lt;P&gt;Try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=nitro_prod_comm_pci com.impl.AgnosticOmsTokenTranslator ("Calling translate" OR "Message translation is successful")) OR (index="nitro_prod_comm_email" INFO EmailType=Order_Confirmation) earliest=-24h
| eval Type=case(index="nitro_prod_comm_email","Email_Confirmed",match(_raw,"Calling translate"),"Calling_Translate",true(),"Message_Translation_Success") | stats count by Type
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Aug 2016 15:41:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-and-compare-three-indexes-in-one-search/m-p/220013#M64673</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-08-09T15:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to search and compare three indexes in one search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-and-compare-three-indexes-in-one-search/m-p/220014#M64674</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2016 15:45:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-and-compare-three-indexes-in-one-search/m-p/220014#M64674</guid>
      <dc:creator>JoshuaJohn</dc:creator>
      <dc:date>2016-08-09T15:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to search and compare three indexes in one search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-and-compare-three-indexes-in-one-search/m-p/220015#M64675</link>
      <description>&lt;P&gt;So I have been trying this and it appears calling translate and message_translation_success are providing the exact same results but they shouldn't be and when tested individually they dont&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:34:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-and-compare-three-indexes-in-one-search/m-p/220015#M64675</guid>
      <dc:creator>JoshuaJohn</dc:creator>
      <dc:date>2020-09-29T10:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to search and compare three indexes in one search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-and-compare-three-indexes-in-one-search/m-p/220016#M64676</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=nitro_prod_comm_pci com.impl.AgnosticOmsTokenTranslator ("Calling translate" OR "Message translation is successful")) OR (index="nitro_prod_comm_email" INFO EmailType=Order_Confirmation) earliest=-24h | rex "(?&amp;lt;status&amp;gt;translate|translation|Order_Confirmation)" | stats count by status | reanme translate AS Calling_Translate translation AS "Message translation is successful" Order_Confirmation AS Email_Confirmed
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Aug 2016 21:34:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-and-compare-three-indexes-in-one-search/m-p/220016#M64676</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-09T21:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to search and compare three indexes in one search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-and-compare-three-indexes-in-one-search/m-p/220017#M64677</link>
      <description>&lt;P&gt;try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=nitro_prod_comm_pci com.impl.AgnosticOmsTokenTranslator "Calling translate" | eval nsearch="search1" | append [ search index=nitro_prod_comm_pci com.impl.AgnosticOmsTokenTranslator "Message translation is successful" | eval nsearch="search2" ] | append [ search index="nitro_prod_comm_email" INFO EmailType=Order_Confirmation | eval nsearch="search3" ] | stats count by nsearch
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2016 07:09:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-and-compare-three-indexes-in-one-search/m-p/220017#M64677</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2016-08-10T07:09:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to search and compare three indexes in one search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-and-compare-three-indexes-in-one-search/m-p/220018#M64678</link>
      <description>&lt;P&gt;Could you provide more info on "providing the exact same result but they shouldn't"?&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 23:09:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-and-compare-three-indexes-in-one-search/m-p/220018#M64678</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-08-15T23:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to search and compare three indexes in one search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-and-compare-three-indexes-in-one-search/m-p/220019#M64679</link>
      <description>&lt;P&gt;It was actually my error with the data, your method works just fine! Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2016 13:44:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-and-compare-three-indexes-in-one-search/m-p/220019#M64679</guid>
      <dc:creator>JoshuaJohn</dc:creator>
      <dc:date>2016-08-16T13:44:31Z</dc:date>
    </item>
  </channel>
</rss>

