<?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 only show stats max(value) where min(value) is greater than 0 in the last 5 minutes? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-only-show-stats-max-value-where-min-value-is-greater-than/m-p/112508#M29561</link>
    <description>&lt;P&gt;Hi all, just getting started and trying to get something together quickly to show management so forgive asking what is probably a trivial question.&lt;/P&gt;

&lt;P&gt;I have a log file which is written to each minute with a count of messages in a number of queues.  I have a chart showing those queues with a none zero count over the last five minutes.&lt;/P&gt;

&lt;PRE&gt;source=".log" id="queue.*" value&amp;gt;0 | stats max(value) by id&lt;/PRE&gt;

&lt;P&gt;I want it to only display queues where the count has not been zero in the previous five minutes as I only care about queues that are not emptying.&lt;/P&gt;

&lt;P&gt;I have tried things along the lines of &lt;/P&gt;

&lt;PRE&gt;source=".log" id="queue.*" value&amp;gt;0 | stats max(value) by id | where min(value) &amp;gt; 0&lt;/PRE&gt;

&lt;P&gt;But cannot get it right, can someone point me in the right direction please.&lt;/P&gt;</description>
    <pubDate>Tue, 31 Mar 2015 09:41:22 GMT</pubDate>
    <dc:creator>chriselst</dc:creator>
    <dc:date>2015-03-31T09:41:22Z</dc:date>
    <item>
      <title>How to only show stats max(value) where min(value) is greater than 0 in the last 5 minutes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-only-show-stats-max-value-where-min-value-is-greater-than/m-p/112508#M29561</link>
      <description>&lt;P&gt;Hi all, just getting started and trying to get something together quickly to show management so forgive asking what is probably a trivial question.&lt;/P&gt;

&lt;P&gt;I have a log file which is written to each minute with a count of messages in a number of queues.  I have a chart showing those queues with a none zero count over the last five minutes.&lt;/P&gt;

&lt;PRE&gt;source=".log" id="queue.*" value&amp;gt;0 | stats max(value) by id&lt;/PRE&gt;

&lt;P&gt;I want it to only display queues where the count has not been zero in the previous five minutes as I only care about queues that are not emptying.&lt;/P&gt;

&lt;P&gt;I have tried things along the lines of &lt;/P&gt;

&lt;PRE&gt;source=".log" id="queue.*" value&amp;gt;0 | stats max(value) by id | where min(value) &amp;gt; 0&lt;/PRE&gt;

&lt;P&gt;But cannot get it right, can someone point me in the right direction please.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2015 09:41:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-only-show-stats-max-value-where-min-value-is-greater-than/m-p/112508#M29561</guid>
      <dc:creator>chriselst</dc:creator>
      <dc:date>2015-03-31T09:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to only show stats max(value) where min(value) is greater than 0 in the last 5 minutes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-only-show-stats-max-value-where-min-value-is-greater-than/m-p/112509#M29562</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;

&lt;P&gt;Following query should help:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=".log" id="queue.*"  | stats max(value) as MAX, min(value) as MIN by id | where MIN  &amp;gt; 0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks!!&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2015 09:48:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-only-show-stats-max-value-where-min-value-is-greater-than/m-p/112509#M29562</guid>
      <dc:creator>vganjare</dc:creator>
      <dc:date>2015-03-31T09:48:07Z</dc:date>
    </item>
  </channel>
</rss>

