<?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 values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-values/m-p/157161#M44218</link>
    <description>&lt;P&gt;Hi, i have a report where i show top 50 404s by uri as shown below. Now i want to get the top referer for each URI in the same report. is it possible? &lt;/P&gt;

&lt;P&gt;URI  COUNT  %&lt;BR /&gt;&lt;BR /&gt;
XXX   50    50%&lt;BR /&gt;
YYY   25    25% &lt;BR /&gt;
ZZZ   25    25%&lt;/P&gt;

&lt;P&gt;output should have&lt;BR /&gt;
URI  COUNT  %     Referer   Referercount REferer%&lt;BR /&gt;
XXX   50    50%&lt;BR /&gt;
YYY   25    25% &lt;BR /&gt;
ZZZ   25    25%&lt;/P&gt;</description>
    <pubDate>Wed, 19 Feb 2014 14:28:59 GMT</pubDate>
    <dc:creator>xvxt006</dc:creator>
    <dc:date>2014-02-19T14:28:59Z</dc:date>
    <item>
      <title>How to get top values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-values/m-p/157161#M44218</link>
      <description>&lt;P&gt;Hi, i have a report where i show top 50 404s by uri as shown below. Now i want to get the top referer for each URI in the same report. is it possible? &lt;/P&gt;

&lt;P&gt;URI  COUNT  %&lt;BR /&gt;&lt;BR /&gt;
XXX   50    50%&lt;BR /&gt;
YYY   25    25% &lt;BR /&gt;
ZZZ   25    25%&lt;/P&gt;

&lt;P&gt;output should have&lt;BR /&gt;
URI  COUNT  %     Referer   Referercount REferer%&lt;BR /&gt;
XXX   50    50%&lt;BR /&gt;
YYY   25    25% &lt;BR /&gt;
ZZZ   25    25%&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2014 14:28:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-values/m-p/157161#M44218</guid>
      <dc:creator>xvxt006</dc:creator>
      <dc:date>2014-02-19T14:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to get top values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-values/m-p/157162#M44219</link>
      <description>&lt;P&gt;You can try:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;|top limit=50 uri |append [yoursearch |top top limit=50 referer by uri]&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I've not tried this, but in theory it should work.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2014 14:38:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-values/m-p/157162#M44219</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2014-02-19T14:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to get top values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-values/m-p/157163#M44220</link>
      <description>&lt;P&gt;that will give me top referers but i want to get top uris for 404s and then for those uris i need top referers&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2014 14:43:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-values/m-p/157163#M44220</guid>
      <dc:creator>xvxt006</dc:creator>
      <dc:date>2014-02-19T14:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to get top values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-values/m-p/157164#M44221</link>
      <description>&lt;P&gt;Right, you want to maintain the numbers for both.  I updated the answer.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2014 14:53:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-values/m-p/157164#M44221</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2014-02-19T14:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to get top values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-values/m-p/157165#M44222</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;yoursearch | top uri | join uri [search yoursearch | top uri referrer | eval referer_count=count | eval referer_percent=percent] | table uri count percent referrer referer_count referer_percent
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 Feb 2014 15:04:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-values/m-p/157165#M44222</guid>
      <dc:creator>thslopes</dc:creator>
      <dc:date>2014-02-19T15:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to get top values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-values/m-p/157166#M44223</link>
      <description>&lt;P&gt;Here's an approach to keep things within one search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your search yielding 404 events | stats c by uri referer | eventstats max(c) as max sum(c) as count by uri | where max==c | fields - max c
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You may want to sort, calculate percentages, and cut after the first n results afterwards to look similar to top.&lt;BR /&gt;
Note: This does not handle cases where the top referers for one uri have equal counts. If that's important for you you can insert a &lt;CODE&gt;... | streamstats count as number by uri referer | where number==1 | fields - number&lt;/CODE&gt; at the end.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2014 15:37:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-values/m-p/157166#M44223</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-02-19T15:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to get top values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-values/m-p/157167#M44224</link>
      <description>&lt;P&gt;Thank you all for your inputs&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2014 20:01:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-values/m-p/157167#M44224</guid>
      <dc:creator>xvxt006</dc:creator>
      <dc:date>2014-02-19T20:01:08Z</dc:date>
    </item>
  </channel>
</rss>

