<?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 How to get top 2 MB users per website? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-2-MB-users-per-website/m-p/166469#M47399</link>
    <description>&lt;P&gt;Hi!&lt;BR /&gt;
That maybe someone has been through this. I have the following table as a result of search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;**website**      **user**        **MB**
  google.com      jperez          125.71
  facebook.com    smartinez       116.90
  facebook.com    jperez          92.45
  facebook.com    asevalloz       71.09
  twitter.com     jperez          63.85
  google.com      marevalo        43.85
  google.com      arios           23.85
  twitter.com     lgutierrez      13.85
  facebook.com    asevalloz       11.09
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And what I would like is to get the 2 users that generate more MB per website. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;**website**      **user**        **MB**
  google.com      jperez          125.71
  google.com      marevalo        43.85
  facebook.com    smartinez       116.90
  facebook.com    jperez          92.45
  twitter.com     jperez          63.85
  twitter.com     lgutierrez      13.85
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried with: &lt;CODE&gt;search...| top 3 MB website by user&lt;/CODE&gt;&lt;BR /&gt;
But it turned out, I would appreciate it much &lt;BR /&gt;
:) &lt;/P&gt;

&lt;P&gt;regards&lt;/P&gt;</description>
    <pubDate>Thu, 31 Jul 2014 23:45:40 GMT</pubDate>
    <dc:creator>jrodriguezap</dc:creator>
    <dc:date>2014-07-31T23:45:40Z</dc:date>
    <item>
      <title>How to get top 2 MB users per website?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-2-MB-users-per-website/m-p/166469#M47399</link>
      <description>&lt;P&gt;Hi!&lt;BR /&gt;
That maybe someone has been through this. I have the following table as a result of search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;**website**      **user**        **MB**
  google.com      jperez          125.71
  facebook.com    smartinez       116.90
  facebook.com    jperez          92.45
  facebook.com    asevalloz       71.09
  twitter.com     jperez          63.85
  google.com      marevalo        43.85
  google.com      arios           23.85
  twitter.com     lgutierrez      13.85
  facebook.com    asevalloz       11.09
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And what I would like is to get the 2 users that generate more MB per website. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;**website**      **user**        **MB**
  google.com      jperez          125.71
  google.com      marevalo        43.85
  facebook.com    smartinez       116.90
  facebook.com    jperez          92.45
  twitter.com     jperez          63.85
  twitter.com     lgutierrez      13.85
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried with: &lt;CODE&gt;search...| top 3 MB website by user&lt;/CODE&gt;&lt;BR /&gt;
But it turned out, I would appreciate it much &lt;BR /&gt;
:) &lt;/P&gt;

&lt;P&gt;regards&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jul 2014 23:45:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-2-MB-users-per-website/m-p/166469#M47399</guid>
      <dc:creator>jrodriguezap</dc:creator>
      <dc:date>2014-07-31T23:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to get top 2 MB users per website?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-2-MB-users-per-website/m-p/166470#M47400</link>
      <description>&lt;P&gt;Try this - let me assume that your events contain the following fields:&lt;/P&gt;

&lt;P&gt;user website MB&lt;/P&gt;

&lt;P&gt;and that each event represents a TCP hit or something similar.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearchhere
| stats sum(MB) as MB by website user
| sort website -MB
| eval counter = 1
| streamstats sum(counter) as seqNo by website
| where seqNo &amp;lt; 3
| fields - counter seqNo
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The &lt;CODE&gt;streamstats&lt;/CODE&gt; command generates a sequence number, which resets for each website. Then the &lt;CODE&gt;where&lt;/CODE&gt; eliminates all but the top 2 users for each website.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Aug 2014 00:29:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-2-MB-users-per-website/m-p/166470#M47400</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-08-01T00:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to get top 2 MB users per website?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-2-MB-users-per-website/m-p/166471#M47401</link>
      <description>&lt;P&gt;Excellent lguinn! &lt;BR /&gt;
It was just the logic I had in mind but did not know how to make, I really appreciate it!&lt;BR /&gt;
:)&lt;/P&gt;</description>
      <pubDate>Fri, 01 Aug 2014 02:11:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-2-MB-users-per-website/m-p/166471#M47401</guid>
      <dc:creator>jrodriguezap</dc:creator>
      <dc:date>2014-08-01T02:11:11Z</dc:date>
    </item>
  </channel>
</rss>

