<?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 where count is &amp;gt; 5 in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/where-count-is-gt-5/m-p/161755#M45711</link>
    <description>&lt;P&gt;Hi Everyone - I'm trying to reduce noise on some of my reports.  Certain messages with "unreadable" are coming in and I only want them on the report if the the count is &amp;gt; 5.   At the same time, I don't want to ignore everything else that is &amp;lt; 5 that does not include "unreadable"...&lt;/P&gt;

&lt;P&gt;Here's what i thought made sense.&lt;BR /&gt;
stats dc(MESSAGE) | where MESSAGE="unreadable" &amp;gt; 5&lt;/P&gt;</description>
    <pubDate>Fri, 21 Feb 2014 20:53:39 GMT</pubDate>
    <dc:creator>subtrakt</dc:creator>
    <dc:date>2014-02-21T20:53:39Z</dc:date>
    <item>
      <title>where count is &gt; 5</title>
      <link>https://community.splunk.com/t5/Splunk-Search/where-count-is-gt-5/m-p/161755#M45711</link>
      <description>&lt;P&gt;Hi Everyone - I'm trying to reduce noise on some of my reports.  Certain messages with "unreadable" are coming in and I only want them on the report if the the count is &amp;gt; 5.   At the same time, I don't want to ignore everything else that is &amp;lt; 5 that does not include "unreadable"...&lt;/P&gt;

&lt;P&gt;Here's what i thought made sense.&lt;BR /&gt;
stats dc(MESSAGE) | where MESSAGE="unreadable" &amp;gt; 5&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2014 20:53:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/where-count-is-gt-5/m-p/161755#M45711</guid>
      <dc:creator>subtrakt</dc:creator>
      <dc:date>2014-02-21T20:53:39Z</dc:date>
    </item>
    <item>
      <title>Re: where count is &gt; 5</title>
      <link>https://community.splunk.com/t5/Splunk-Search/where-count-is-gt-5/m-p/161756#M45712</link>
      <description>&lt;P&gt;I don't quite understand your example, so here's how you would filter events based on your description:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | where NOT (count &amp;lt;= 5 AND match(MESSAGE, "unreadable"))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That will drop events if the count is less or equal five and the message contains "unreadable".&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2014 21:28:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/where-count-is-gt-5/m-p/161756#M45712</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-02-21T21:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: where count is &gt; 5</title>
      <link>https://community.splunk.com/t5/Splunk-Search/where-count-is-gt-5/m-p/161757#M45713</link>
      <description>&lt;P&gt;I'd like to point out for the original poster that your method assumes that the stats command is "stats count by MESSAGE" instead of "stats dc(MESSAGE)", which will count the number of times a particular message in MESSAGE is encountered (which I believe is what they want) instead of counting the number of different values that MESSAGE holds (which is in the example, but not necessarily what they are asking for).&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2014 22:05:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/where-count-is-gt-5/m-p/161757#M45713</guid>
      <dc:creator>petermuller</dc:creator>
      <dc:date>2014-02-21T22:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: where count is &gt; 5</title>
      <link>https://community.splunk.com/t5/Splunk-Search/where-count-is-gt-5/m-p/161758#M45714</link>
      <description>&lt;P&gt;Well, filtering based on message content isn't going to be possible after a &lt;CODE&gt;stats dc(message)&lt;/CODE&gt; because that just yields a single number.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2014 22:48:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/where-count-is-gt-5/m-p/161758#M45714</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-02-21T22:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: where count is &gt; 5</title>
      <link>https://community.splunk.com/t5/Splunk-Search/where-count-is-gt-5/m-p/161759#M45715</link>
      <description>&lt;P&gt;Martin, does stats have to be in the query before the '| where'?&lt;/P&gt;</description>
      <pubDate>Sat, 22 Feb 2014 20:47:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/where-count-is-gt-5/m-p/161759#M45715</guid>
      <dc:creator>subtrakt</dc:creator>
      <dc:date>2014-02-22T20:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: where count is &gt; 5</title>
      <link>https://community.splunk.com/t5/Splunk-Search/where-count-is-gt-5/m-p/161760#M45716</link>
      <description>&lt;P&gt;All the &lt;CODE&gt;where&lt;/CODE&gt; needs is the two fields referenced - where they come from doesn't matter.&lt;/P&gt;

&lt;P&gt;If you compute them using &lt;CODE&gt;stats&lt;/CODE&gt; then yes, the &lt;CODE&gt;stats&lt;/CODE&gt; must be somewhere before the &lt;CODE&gt;where&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Feb 2014 20:50:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/where-count-is-gt-5/m-p/161760#M45716</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-02-22T20:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: where count is &gt; 5</title>
      <link>https://community.splunk.com/t5/Splunk-Search/where-count-is-gt-5/m-p/161761#M45717</link>
      <description>&lt;P&gt;nevermind, didn't read peter's post.  Thanks everyone.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Feb 2014 21:01:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/where-count-is-gt-5/m-p/161761#M45717</guid>
      <dc:creator>subtrakt</dc:creator>
      <dc:date>2014-02-22T21:01:55Z</dc:date>
    </item>
  </channel>
</rss>

