<?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 Re: How to show the top command with distinct value? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-top-command-with-distinct-value/m-p/428825#M172550</link>
    <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=proxy 
| stats dc(user) as UniqUsers count by dest_host
| sort 5 -count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 12 Mar 2019 13:57:36 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2019-03-12T13:57:36Z</dc:date>
    <item>
      <title>How to show the top command with distinct value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-top-command-with-distinct-value/m-p/428824#M172549</link>
      <description>&lt;P&gt;I've got proxy logs and I want to show the top  5 urls and for that the count of distinct users who tried to access it.&lt;BR /&gt;
I tried the following search command &lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;index=proxy &lt;BR /&gt;
| eval dc_user=[search* stats dc(user) by url| return $dc_user] &lt;BR /&gt;
| top dest_host limit=5 &lt;BR /&gt;
| table dest_host dc_user&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;How can I get this work? &lt;BR /&gt;
I also wanted to add the count of the url and the percentage. &lt;/P&gt;

&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:36:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-top-command-with-distinct-value/m-p/428824#M172549</guid>
      <dc:creator>igschloessl</dc:creator>
      <dc:date>2020-09-29T23:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to show the top command with distinct value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-top-command-with-distinct-value/m-p/428825#M172550</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=proxy 
| stats dc(user) as UniqUsers count by dest_host
| sort 5 -count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Mar 2019 13:57:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-top-command-with-distinct-value/m-p/428825#M172550</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2019-03-12T13:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to show the top command with distinct value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-top-command-with-distinct-value/m-p/428826#M172551</link>
      <description>&lt;P&gt;Does this do what you need?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=proxy
| eventstats dc(user) as unique_users by url
| top url 
| sort 5 - count
| table url, unique_users, count, percent
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Mar 2019 15:40:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-top-command-with-distinct-value/m-p/428826#M172551</guid>
      <dc:creator>cpmoone</dc:creator>
      <dc:date>2019-03-13T15:40:58Z</dc:date>
    </item>
  </channel>
</rss>

