<?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 perform stats count on all three indexes, and combine them to show as a Timechart? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-stats-count-on-all-three-indexes-and-combine-them/m-p/409142#M118042</link>
    <description>&lt;P&gt;@ niketnilay thank you for quick response.&lt;BR /&gt;
option 1 solved my issue.&lt;/P&gt;</description>
    <pubDate>Thu, 24 May 2018 06:43:55 GMT</pubDate>
    <dc:creator>kapilbk1996</dc:creator>
    <dc:date>2018-05-24T06:43:55Z</dc:date>
    <item>
      <title>How to perform stats count on all three indexes, and combine them to show as a Timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-stats-count-on-all-three-indexes-and-combine-them/m-p/409140#M118040</link>
      <description>&lt;P&gt;I have log file say A,B,C and their corresponding index is say index_A,index_B,index_C. &lt;BR /&gt;
I want to perform stats count on all three indexes, and combine them to show as Timechart. I used the following query.&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;index="index_A"&lt;BR /&gt;
"[ERROR]" | timechart  count as&lt;BR /&gt;
temp1 | appendcols [search index&lt;BR /&gt;
= "index_B" | timechart   count as temp2 ] |&lt;BR /&gt;
appendcols [search index =&lt;BR /&gt;
"index_C" | timechart &lt;BR /&gt;
count as temp3]&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/250783-screen-shot-2018-05-24-at-104229-am.png" alt="alt text" /&gt; &lt;/P&gt;

&lt;P&gt;This query is giving me correct result. The TImechart is shown above.&lt;BR /&gt;
The issue is when I click on the Timechart to get the corresponding events for corresponding index, it always shows me the events of index_A only (even if I choose index_B or index_C).&lt;BR /&gt;
This is because I had mentioned index_A at the starting of search query. &lt;/P&gt;

&lt;P&gt;What changes do I need to make so that if I click on index other then index_A, I'll get the corresponding events?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:37:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-perform-stats-count-on-all-three-indexes-and-combine-them/m-p/409140#M118040</guid>
      <dc:creator>kapilbk1996</dc:creator>
      <dc:date>2020-09-29T19:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform stats count on all three indexes, and combine them to show as a Timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-stats-count-on-all-three-indexes-and-combine-them/m-p/409141#M118041</link>
      <description>&lt;P&gt;@kapilbk1996, While using subsearches default drilldown will be limited to your main search. Following are your couple of options.&lt;/P&gt;

&lt;P&gt;Option 1: Keep a single base search for various indexes:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index="index_A" AND "[ERROR]") OR (index="index_B") OR (index="index_C") 
| timechart count by index 
| rename index_A as temp1 
| rename index_B as temp2 
| rename index_C as temp3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Option 2: Create your own drilldown using predefined drilldown tokens: &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Viz/DrilldownIntro"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Viz/DrilldownIntro&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 May 2018 06:20:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-perform-stats-count-on-all-three-indexes-and-combine-them/m-p/409141#M118041</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-05-24T06:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform stats count on all three indexes, and combine them to show as a Timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-stats-count-on-all-three-indexes-and-combine-them/m-p/409142#M118042</link>
      <description>&lt;P&gt;@ niketnilay thank you for quick response.&lt;BR /&gt;
option 1 solved my issue.&lt;/P&gt;</description>
      <pubDate>Thu, 24 May 2018 06:43:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-perform-stats-count-on-all-three-indexes-and-combine-them/m-p/409142#M118042</guid>
      <dc:creator>kapilbk1996</dc:creator>
      <dc:date>2018-05-24T06:43:55Z</dc:date>
    </item>
  </channel>
</rss>

