<?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 Top 10 for every timespan in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Top-10-for-every-timespan/m-p/299695#M160249</link>
    <description>&lt;P&gt;I have data of mail sending activities of 1000s of customers and need to find the top 10 mail sending customers for every 10minutes for the customer data of the past 1 month. I need to create a stacked chart of the same. Any suggestions how this could be done. for the past 24hrs the top customers have been found as follows &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=campaign_prod sourcetype=witness_stat_log virtualization=* earliest=-1d | dedup host| table host customer_name | join type=outer host [search index=campaign_prod sourcetype=mtachild_log message_type=info "sent"| stats count as email_count by host] | fillnull value=0 email_count | stats sum(email_count) as mail_count by customer_name | sort 0 -mail_count | head 20
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 10 Jul 2017 10:31:35 GMT</pubDate>
    <dc:creator>AshimaE</dc:creator>
    <dc:date>2017-07-10T10:31:35Z</dc:date>
    <item>
      <title>Top 10 for every timespan</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Top-10-for-every-timespan/m-p/299695#M160249</link>
      <description>&lt;P&gt;I have data of mail sending activities of 1000s of customers and need to find the top 10 mail sending customers for every 10minutes for the customer data of the past 1 month. I need to create a stacked chart of the same. Any suggestions how this could be done. for the past 24hrs the top customers have been found as follows &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=campaign_prod sourcetype=witness_stat_log virtualization=* earliest=-1d | dedup host| table host customer_name | join type=outer host [search index=campaign_prod sourcetype=mtachild_log message_type=info "sent"| stats count as email_count by host] | fillnull value=0 email_count | stats sum(email_count) as mail_count by customer_name | sort 0 -mail_count | head 20
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Jul 2017 10:31:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Top-10-for-every-timespan/m-p/299695#M160249</guid>
      <dc:creator>AshimaE</dc:creator>
      <dc:date>2017-07-10T10:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: Top 10 for every timespan</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Top-10-for-every-timespan/m-p/299696#M160250</link>
      <description>&lt;P&gt;Hi AshimaE,&lt;BR /&gt;
try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=campaign_prod sourcetype=witness_stat_log virtualization=* earliest=-1d 
| dedup host
| join type=outer host [ search 
    index=campaign_prod sourcetype=mtachild_log message_type=info "sent" 
   | stats count as email_count by host 
   ] 
| fillnull value=0 email_count 
| bin span=10m _time
| stats sum(email_count) as mail_count by customer_name, _time 
| sort 0 -mail_count 
| head 20
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2017 10:44:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Top-10-for-every-timespan/m-p/299696#M160250</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-07-10T10:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: Top 10 for every timespan</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Top-10-for-every-timespan/m-p/299697#M160251</link>
      <description>&lt;P&gt;But this will give the top 20 overall while I want the top 10 or 20 for each timespan of the 1 month period.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2017 10:48:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Top-10-for-every-timespan/m-p/299697#M160251</guid>
      <dc:creator>AshimaE</dc:creator>
      <dc:date>2017-07-10T10:48:40Z</dc:date>
    </item>
  </channel>
</rss>

