<?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: extract top ten values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/extract-top-ten-values/m-p/324038#M161795</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;The most straight forward way to handle this would be to use the top command.  &lt;/P&gt;

&lt;P&gt;A couple of things to note.  You'll want to wildcard your sourcetype so that you do indeed pickup the wineventlog sourcetypes (i.e. sourcetype="wineventlog:*").  In addition, you'll want to wrap the OR condition on the Type fields in parenthesis as such (Type="Critique" OR Type="Avertissement")&lt;/P&gt;

&lt;P&gt;SPL...&lt;/P&gt;

&lt;P&gt;index="wineventlog" sourcetype="wineventlog:*" SourceName="" (Type="Critique" OR Type="Avertissement") &lt;BR /&gt;
| dedup _time SourceName &lt;BR /&gt;
| top limit=10 SourceName&lt;/P&gt;</description>
    <pubDate>Mon, 09 Apr 2018 18:28:35 GMT</pubDate>
    <dc:creator>tpeveler_splunk</dc:creator>
    <dc:date>2018-04-09T18:28:35Z</dc:date>
    <item>
      <title>extract top ten values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/extract-top-ten-values/m-p/324035#M161792</link>
      <description>&lt;P&gt;hi&lt;BR /&gt;
i use this code&lt;BR /&gt;
index="wineventlog" sourcetype="wineventlog:&lt;EM&gt;" SourceName="&lt;/EM&gt;" Type="Critique" OR Type="Avertissement" | dedup _time SourceName | table  _time SourceName | stats count by SourceName&lt;/P&gt;

&lt;P&gt;and i would like to keep only the ten important values&lt;BR /&gt;
how to do it please???&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 15:02:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/extract-top-ten-values/m-p/324035#M161792</guid>
      <dc:creator>jip31jip31</dc:creator>
      <dc:date>2018-04-09T15:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: extract top ten values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/extract-top-ten-values/m-p/324036#M161793</link>
      <description>&lt;P&gt;use the &lt;CODE&gt;top&lt;/CODE&gt; command? &lt;CODE&gt;... | top limit=10 SourceName&lt;/CODE&gt;&lt;BR /&gt;
or maybe &lt;CODE&gt;sort&lt;/CODE&gt; command &lt;CODE&gt;... | sort 10 - count&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 15:55:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/extract-top-ten-values/m-p/324036#M161793</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2018-04-09T15:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: extract top ten values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/extract-top-ten-values/m-p/324037#M161794</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index="wineventlog" sourcetype="wineventlog:" SourceName="" Type="Critique" OR Type="Avertissement" 
| dedup _time SourceName 
| table _time SourceName 
| stats count by SourceName
| sort - count limit=10
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Sort by the field you want the top 10 of.  (I used your count)&lt;BR /&gt;
Then set limit= for how many you want to keep.  &lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 17:48:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/extract-top-ten-values/m-p/324037#M161794</guid>
      <dc:creator>kmaron</dc:creator>
      <dc:date>2018-04-09T17:48:08Z</dc:date>
    </item>
    <item>
      <title>Re: extract top ten values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/extract-top-ten-values/m-p/324038#M161795</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;The most straight forward way to handle this would be to use the top command.  &lt;/P&gt;

&lt;P&gt;A couple of things to note.  You'll want to wildcard your sourcetype so that you do indeed pickup the wineventlog sourcetypes (i.e. sourcetype="wineventlog:*").  In addition, you'll want to wrap the OR condition on the Type fields in parenthesis as such (Type="Critique" OR Type="Avertissement")&lt;/P&gt;

&lt;P&gt;SPL...&lt;/P&gt;

&lt;P&gt;index="wineventlog" sourcetype="wineventlog:*" SourceName="" (Type="Critique" OR Type="Avertissement") &lt;BR /&gt;
| dedup _time SourceName &lt;BR /&gt;
| top limit=10 SourceName&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 18:28:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/extract-top-ten-values/m-p/324038#M161795</guid>
      <dc:creator>tpeveler_splunk</dc:creator>
      <dc:date>2018-04-09T18:28:35Z</dc:date>
    </item>
  </channel>
</rss>

