<?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 Merging Splunk Searches in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Merging-Splunk-Searches/m-p/427755#M168475</link>
    <description>&lt;P&gt;Hi Pros,&lt;/P&gt;

&lt;P&gt;I want to merge results of two queries together and need some help in achieving the best possible way to do it...&lt;/P&gt;

&lt;P&gt;index=* sourcetype=* | top sourcetype limit=200&lt;BR /&gt;
index=* sourcetype=* | stats count(host) by sourcetype &lt;/P&gt;

&lt;P&gt;I want to show.... following results...&lt;/P&gt;

&lt;P&gt;Sourcetype        Hosts(number of hosts contributing to the sourcetype)        Count(Event count)          Percentage (based on time)&lt;/P&gt;</description>
    <pubDate>Fri, 06 Jul 2018 06:07:09 GMT</pubDate>
    <dc:creator>memow8</dc:creator>
    <dc:date>2018-07-06T06:07:09Z</dc:date>
    <item>
      <title>Merging Splunk Searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Merging-Splunk-Searches/m-p/427755#M168475</link>
      <description>&lt;P&gt;Hi Pros,&lt;/P&gt;

&lt;P&gt;I want to merge results of two queries together and need some help in achieving the best possible way to do it...&lt;/P&gt;

&lt;P&gt;index=* sourcetype=* | top sourcetype limit=200&lt;BR /&gt;
index=* sourcetype=* | stats count(host) by sourcetype &lt;/P&gt;

&lt;P&gt;I want to show.... following results...&lt;/P&gt;

&lt;P&gt;Sourcetype        Hosts(number of hosts contributing to the sourcetype)        Count(Event count)          Percentage (based on time)&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jul 2018 06:07:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Merging-Splunk-Searches/m-p/427755#M168475</guid>
      <dc:creator>memow8</dc:creator>
      <dc:date>2018-07-06T06:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Splunk Searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Merging-Splunk-Searches/m-p/427756#M168476</link>
      <description>&lt;P&gt;Hi @memow8,&lt;/P&gt;

&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="your index"|stats count(host) as no_of_hosts by sourcetype|eventstats sum(no_of_hosts) as total|eval perc=round((no_of_hosts/total)*100,2)|sort -no_of_hosts
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Jul 2018 13:19:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Merging-Splunk-Searches/m-p/427756#M168476</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-07-06T13:19:31Z</dc:date>
    </item>
  </channel>
</rss>

