<?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: Count as a limiting factor for results of a nested query? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Count-as-a-limiting-factor-for-results-of-a-nested-query/m-p/55605#M13569</link>
    <description>&lt;P&gt;Why the subsearch? &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=logs | stats c by error, host | search c &amp;gt; 10
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Perhaps there is some simplification you've made regarding the actual logs. If this does not work, please post a few sample lines of actual log.&lt;/P&gt;

&lt;P&gt;hope this helps,&lt;/P&gt;

&lt;P&gt;Kristian&lt;/P&gt;</description>
    <pubDate>Mon, 10 Sep 2012 18:18:06 GMT</pubDate>
    <dc:creator>kristian_kolb</dc:creator>
    <dc:date>2012-09-10T18:18:06Z</dc:date>
    <item>
      <title>Count as a limiting factor for results of a nested query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-as-a-limiting-factor-for-results-of-a-nested-query/m-p/55604#M13568</link>
      <description>&lt;P&gt;I'm attempting to identify the top 5 hosts responsible for my errors via the following query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=logs 
[ search sourcetype=logs 
| top 0 errors showperc=false showcount=false ] 
| top 5 hosts by errors showperc=false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This query works, but gives me results for a ton of errors. I would like to limit the results to only errors per host that are greater than a count of 10. However when I add the following line to my query, I get no results:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| search count &amp;gt; 10
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I know that I have results that are &amp;gt; 10, so this logic is valid, but I cannot figure out how to properly apply it.&lt;/P&gt;

&lt;P&gt;Here's a sample of what my results look like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; - host  - error - count 
 - APP01 - err09 - 50 
 - APP01 - err07 - 38 
 - APP01 - err05 - 27 
 - APP01 - err10 - 20 
 - APP01 - err12 - 4 
 - APP02 - err15 - 33 
 - APP02 - err60 - 21 
 - APP02 - err09 - 8
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;...&lt;/P&gt;

&lt;P&gt;Any ideas on how to remove the rows with counts that are not greater than 10?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2012 16:20:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-as-a-limiting-factor-for-results-of-a-nested-query/m-p/55604#M13568</guid>
      <dc:creator>fncds3</dc:creator>
      <dc:date>2012-09-10T16:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: Count as a limiting factor for results of a nested query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-as-a-limiting-factor-for-results-of-a-nested-query/m-p/55605#M13569</link>
      <description>&lt;P&gt;Why the subsearch? &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=logs | stats c by error, host | search c &amp;gt; 10
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Perhaps there is some simplification you've made regarding the actual logs. If this does not work, please post a few sample lines of actual log.&lt;/P&gt;

&lt;P&gt;hope this helps,&lt;/P&gt;

&lt;P&gt;Kristian&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2012 18:18:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-as-a-limiting-factor-for-results-of-a-nested-query/m-p/55605#M13569</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2012-09-10T18:18:06Z</dc:date>
    </item>
  </channel>
</rss>

