<?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: Intergrate data between two indexes in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Intergrate-data-between-two-indexes/m-p/540759#M153036</link>
    <description>&lt;P&gt;Sorry, the code I post was lacking the calculation of the success rate. My main problem lie in the Total and the Total_night&lt;/P&gt;</description>
    <pubDate>Mon, 22 Feb 2021 04:43:25 GMT</pubDate>
    <dc:creator>phamxuantung</dc:creator>
    <dc:date>2021-02-22T04:43:25Z</dc:date>
    <item>
      <title>Intergrate data between two indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Intergrate-data-between-two-indexes/m-p/540751#M153033</link>
      <description>&lt;P&gt;Hi, I have a search as such but it don't show the results I want&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index="index1")
OR (index="index2")
|search date_hour&amp;gt;20 OR date_hour&amp;lt;5
|eval MERCHANT_CODE1=mvdedup(mvappend(CODE, MERCHANT_CODE))
|eval SUCCESS=if(RESPONSE_CODE="0",1,0)
|stats count AS Total_night SUM(SUCCESS) AS SUCCESS_TOTAL BY MERCHANT_CODE1, ACQ_BANK
|eval SUCCESS_RATE=round(SUCCESS/Total_night*100,2)
|search SUCCESS_RATE&amp;gt;=70
|table MERCHANT_CODE1, SUCCESS_RATE, ACQ_BANK, Total_night, Total&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The requirement is merchants that have more than 70% success transactions in the time range from 20h to 5h in a month.&lt;BR /&gt;The table results require as above.&amp;nbsp;&lt;BR /&gt;My problem is the transactions data is at index1, the ACQ_BANK for each merchant is at index2, I want to show them at the table without the manual checking for each one, I also want to show the Total success for a month but with the code above I don't have any result. If I don't include index2 and remove ACQ_BANK after the BY, I have the result I want.&lt;BR /&gt;&lt;BR /&gt;If anyone have a suggestion I would really appreciate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 04:41:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Intergrate-data-between-two-indexes/m-p/540751#M153033</guid>
      <dc:creator>phamxuantung</dc:creator>
      <dc:date>2021-02-22T04:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: Intergrate data between two indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Intergrate-data-between-two-indexes/m-p/540757#M153035</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/230393"&gt;@phamxuantung&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;You need to calculate&amp;nbsp;&lt;STRONG&gt;SUCCESS_RATE&lt;/STRONG&gt;.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index="index1")
OR (index="index2")
|search date_hour&amp;gt;20 OR date_hour&amp;lt;5
|eval MERCHANT_CODE1=mvdedup(mvappend(CODE, MERCHANT_CODE))
|stats count AS Total_night count(eval(RESPONSE_CODE="0")) AS SUCCESS_TOTAL BY MERCHANT_CODE1, ACQ_BANK
|eval SUCCESS_RATE=(SUCCESS_TOTAL*100)/Total_night
|search SUCCESS_RATE&amp;gt;=70
|table MERCHANT_CODE1, SUCCESS_RATE, ACQ_BANK, Total_night, Total&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this reply helps you, an upvote/like would be appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 04:37:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Intergrate-data-between-two-indexes/m-p/540757#M153035</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2021-02-22T04:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: Intergrate data between two indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Intergrate-data-between-two-indexes/m-p/540759#M153036</link>
      <description>&lt;P&gt;Sorry, the code I post was lacking the calculation of the success rate. My main problem lie in the Total and the Total_night&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 04:43:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Intergrate-data-between-two-indexes/m-p/540759#M153036</guid>
      <dc:creator>phamxuantung</dc:creator>
      <dc:date>2021-02-22T04:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: Intergrate data between two indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Intergrate-data-between-two-indexes/m-p/540760#M153037</link>
      <description>&lt;P&gt;How is &lt;STRONG&gt;Total&lt;/STRONG&gt; calculated? Is it available in the index?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 04:48:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Intergrate-data-between-two-indexes/m-p/540760#M153037</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2021-02-22T04:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: Intergrate data between two indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Intergrate-data-between-two-indexes/m-p/540762#M153039</link>
      <description>&lt;P&gt;Total is the total success transaction in that month, Total_night is the total success transactions between 20h and 5h, RESPONSE_CODE="0" is the success transaction indicator. Since I specify the search time at the beginning (the date_hour part), I can't count the Total.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 04:58:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Intergrate-data-between-two-indexes/m-p/540762#M153039</guid>
      <dc:creator>phamxuantung</dc:creator>
      <dc:date>2021-02-22T04:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: Intergrate data between two indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Intergrate-data-between-two-indexes/m-p/540767#M153042</link>
      <description>&lt;P&gt;Remove&amp;nbsp;&lt;SPAN&gt;search time filter in the beginning. You can use stats with eval expression.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index="index1")
OR (index="index2")
|eval MERCHANT_CODE1=mvdedup(mvappend(CODE, MERCHANT_CODE))
|stats count AS Total count(eval(date_hour&amp;gt;20 OR date_hour&amp;lt;5)) as Total_night count(eval(RESPONSE_CODE="0")) AS SUCCESS_TOTAL BY MERCHANT_CODE1, ACQ_BANK
|eval SUCCESS_RATE=(SUCCESS_TOTAL*100)/Total_night
|search SUCCESS_RATE&amp;gt;=70
|table MERCHANT_CODE1, SUCCESS_RATE, ACQ_BANK, Total_night, Total&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this reply helps you, an upvote/like would be appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 05:22:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Intergrate-data-between-two-indexes/m-p/540767#M153042</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2021-02-22T05:22:19Z</dc:date>
    </item>
  </channel>
</rss>

