<?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 Retrieving stats from multiple summary reports in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Retrieving-stats-from-multiple-summary-reports/m-p/74258#M18695</link>
    <description>&lt;P&gt;What's the best way to retrieve stats from multiple reports in the summary index?  We have a remote client that will use the REST API to run a search that should return 4 data points, each of which is a value calculated from a different report in our summary index.  I thought we could use repeated "| search" commands but either I have the syntax incorrect or it isn't supported.  As an example of the type of data being accessed:&lt;/P&gt;

&lt;P&gt;index=summary report=unique_clients : contains Unique_Clients field which is #unique clients over time&lt;/P&gt;

&lt;P&gt;index=summary report=4xx_errors : contains Num_Errors field which is # of 4* errors over time&lt;/P&gt;

&lt;P&gt;I would like to run one search that combines the results of searches similar to the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=summary report=unique_clients | stats sum(Unique_Clients) ...

index=summary report=4xx_errors | stats sum(NumErrors) ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to return all 4 data points in one call to save on network overhead and also provide the data in a form useful to the remote client; it's silly to have them make 4 separate calls, and worse when we eventually need to return even more distinct data points to the remote clients.  Thanks for any pointers,&lt;/P&gt;

&lt;P&gt;Tom&lt;/P&gt;</description>
    <pubDate>Tue, 05 Apr 2011 03:51:12 GMT</pubDate>
    <dc:creator>beaumaris</dc:creator>
    <dc:date>2011-04-05T03:51:12Z</dc:date>
    <item>
      <title>Retrieving stats from multiple summary reports</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Retrieving-stats-from-multiple-summary-reports/m-p/74258#M18695</link>
      <description>&lt;P&gt;What's the best way to retrieve stats from multiple reports in the summary index?  We have a remote client that will use the REST API to run a search that should return 4 data points, each of which is a value calculated from a different report in our summary index.  I thought we could use repeated "| search" commands but either I have the syntax incorrect or it isn't supported.  As an example of the type of data being accessed:&lt;/P&gt;

&lt;P&gt;index=summary report=unique_clients : contains Unique_Clients field which is #unique clients over time&lt;/P&gt;

&lt;P&gt;index=summary report=4xx_errors : contains Num_Errors field which is # of 4* errors over time&lt;/P&gt;

&lt;P&gt;I would like to run one search that combines the results of searches similar to the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=summary report=unique_clients | stats sum(Unique_Clients) ...

index=summary report=4xx_errors | stats sum(NumErrors) ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to return all 4 data points in one call to save on network overhead and also provide the data in a form useful to the remote client; it's silly to have them make 4 separate calls, and worse when we eventually need to return even more distinct data points to the remote clients.  Thanks for any pointers,&lt;/P&gt;

&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2011 03:51:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Retrieving-stats-from-multiple-summary-reports/m-p/74258#M18695</guid>
      <dc:creator>beaumaris</dc:creator>
      <dc:date>2011-04-05T03:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving stats from multiple summary reports</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Retrieving-stats-from-multiple-summary-reports/m-p/74259#M18696</link>
      <description>&lt;P&gt;This would probably be done easiest w/ the 'append' search command like so:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=summary report=unique_clients | stats sum(Unique_Clients) ... | append[search index=summary report=4xx_errors | stats sum(NumErrors) ...]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The only problem I forsee is figuring which rows should have values for which columns.  It may be simple enough to ignore null column values for a given row.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2011 04:48:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Retrieving-stats-from-multiple-summary-reports/m-p/74259#M18696</guid>
      <dc:creator>hazekamp</dc:creator>
      <dc:date>2011-04-05T04:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving stats from multiple summary reports</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Retrieving-stats-from-multiple-summary-reports/m-p/74260#M18697</link>
      <description>&lt;P&gt;Why not keep it simple?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=summary report=unique_clients OR report=4xx_errors 
| stats sum(Unique_Clients) as uc_sum sum(NumErrors) as ne_sum
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Apr 2011 04:56:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Retrieving-stats-from-multiple-summary-reports/m-p/74260#M18697</guid>
      <dc:creator>araitz</dc:creator>
      <dc:date>2011-04-05T04:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving stats from multiple summary reports</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Retrieving-stats-from-multiple-summary-reports/m-p/74261#M18698</link>
      <description>&lt;P&gt;This should work as well as long as you don't have different split-by fields.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2011 07:07:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Retrieving-stats-from-multiple-summary-reports/m-p/74261#M18698</guid>
      <dc:creator>hazekamp</dc:creator>
      <dc:date>2011-04-05T07:07:42Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving stats from multiple summary reports</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Retrieving-stats-from-multiple-summary-reports/m-p/74262#M18699</link>
      <description>&lt;P&gt;a little bit of eval field1=if(isnull(field1),field2,field1) can go a long way to normalize different field spaces.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2011 13:23:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Retrieving-stats-from-multiple-summary-reports/m-p/74262#M18699</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2011-04-05T13:23:10Z</dc:date>
    </item>
  </channel>
</rss>

