<?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 append search to different sources in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/append-search-to-different-sources/m-p/290723#M87858</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I want to combine to searches:&lt;/P&gt;

&lt;P&gt;index=bla | stats count(al_responsecode) as "Total per responseCode al" by al_responsecode | appendcols [ search index=blaat2 sourcetype=access_log | stats count(responseCode) as "Total per responseCode" by responseCode] | table al_responsecode responseCode "Total per responseCode al" "Total per responseCode"&lt;/P&gt;

&lt;P&gt;1e search:&lt;BR /&gt;
response code; total &lt;BR /&gt;
200;122&lt;BR /&gt;
204;16&lt;BR /&gt;
302;13&lt;BR /&gt;
304;23&lt;BR /&gt;
401;19&lt;BR /&gt;
404;44&lt;BR /&gt;
505;1&lt;/P&gt;

&lt;P&gt;2e search:&lt;BR /&gt;
200;113&lt;BR /&gt;
204;9&lt;BR /&gt;
304;23&lt;BR /&gt;
401;19&lt;BR /&gt;
404;4&lt;/P&gt;

&lt;P&gt;outcome:&lt;BR /&gt;
200;122;113&lt;BR /&gt;
204;16;9&lt;BR /&gt;
302;13;23&lt;BR /&gt;
304;23;19&lt;BR /&gt;
401;19;4&lt;BR /&gt;
404;44&lt;BR /&gt;&lt;BR /&gt;
505;1 &lt;/P&gt;

&lt;P&gt;But I want:&lt;BR /&gt;
200;122;113&lt;BR /&gt;
204;16;9&lt;BR /&gt;
302;13;0&lt;BR /&gt;
304;23;23&lt;BR /&gt;
401;19;19&lt;BR /&gt;
404;44;4&lt;BR /&gt;
505;1;0&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 12:48:19 GMT</pubDate>
    <dc:creator>arjangoos</dc:creator>
    <dc:date>2020-09-29T12:48:19Z</dc:date>
    <item>
      <title>append search to different sources</title>
      <link>https://community.splunk.com/t5/Splunk-Search/append-search-to-different-sources/m-p/290723#M87858</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I want to combine to searches:&lt;/P&gt;

&lt;P&gt;index=bla | stats count(al_responsecode) as "Total per responseCode al" by al_responsecode | appendcols [ search index=blaat2 sourcetype=access_log | stats count(responseCode) as "Total per responseCode" by responseCode] | table al_responsecode responseCode "Total per responseCode al" "Total per responseCode"&lt;/P&gt;

&lt;P&gt;1e search:&lt;BR /&gt;
response code; total &lt;BR /&gt;
200;122&lt;BR /&gt;
204;16&lt;BR /&gt;
302;13&lt;BR /&gt;
304;23&lt;BR /&gt;
401;19&lt;BR /&gt;
404;44&lt;BR /&gt;
505;1&lt;/P&gt;

&lt;P&gt;2e search:&lt;BR /&gt;
200;113&lt;BR /&gt;
204;9&lt;BR /&gt;
304;23&lt;BR /&gt;
401;19&lt;BR /&gt;
404;4&lt;/P&gt;

&lt;P&gt;outcome:&lt;BR /&gt;
200;122;113&lt;BR /&gt;
204;16;9&lt;BR /&gt;
302;13;23&lt;BR /&gt;
304;23;19&lt;BR /&gt;
401;19;4&lt;BR /&gt;
404;44&lt;BR /&gt;&lt;BR /&gt;
505;1 &lt;/P&gt;

&lt;P&gt;But I want:&lt;BR /&gt;
200;122;113&lt;BR /&gt;
204;16;9&lt;BR /&gt;
302;13;0&lt;BR /&gt;
304;23;23&lt;BR /&gt;
401;19;19&lt;BR /&gt;
404;44;4&lt;BR /&gt;
505;1;0&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:48:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/append-search-to-different-sources/m-p/290723#M87858</guid>
      <dc:creator>arjangoos</dc:creator>
      <dc:date>2020-09-29T12:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: append search to different sources</title>
      <link>https://community.splunk.com/t5/Splunk-Search/append-search-to-different-sources/m-p/290724#M87859</link>
      <description>&lt;P&gt;Try like this (after chart, there will a column for each index. replace the correct index name in the rename command)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=blah OR (index=blah2 sourcetype=access_log)  | eval ResponseCode=coalesce(al_responsecode,responseCode) 
| chart  count over ResponseCode by index | rename "blah" as "Total per responseCode al" , "blah2" as  "Total per responseCode" 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Feb 2017 16:23:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/append-search-to-different-sources/m-p/290724#M87859</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-02-08T16:23:32Z</dc:date>
    </item>
  </channel>
</rss>

