<?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 Query results based on stats in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Query-results-based-on-stats/m-p/39184#M8935</link>
    <description>&lt;P&gt;I would like to produce results from a query of syslog, based on the number of events using "stats", but show the results in the console, and not the "counts".&lt;/P&gt;

&lt;P&gt;For example, the statement "&lt;CODE&gt;dual | stats count by host | where count &amp;gt; 50&lt;/CODE&gt;" gives me a list of any device with greater than 50 hits of the word "dual".  In the results window, it shows the list of routers and their counts...which is still useful data, but not what I'm looking for.&lt;/P&gt;

&lt;P&gt;I'm looking for the results in the window to be the actual syslog messages...without having to click something else first.&lt;/P&gt;

&lt;P&gt;Is this possible?  Seems like it should be simple, and I've tried many iterations of commands, but haven't come up with the right way to do it.&lt;/P&gt;

&lt;P&gt;Thanks!!&lt;/P&gt;</description>
    <pubDate>Sat, 05 Feb 2011 00:28:57 GMT</pubDate>
    <dc:creator>mmletzko</dc:creator>
    <dc:date>2011-02-05T00:28:57Z</dc:date>
    <item>
      <title>Query results based on stats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-results-based-on-stats/m-p/39184#M8935</link>
      <description>&lt;P&gt;I would like to produce results from a query of syslog, based on the number of events using "stats", but show the results in the console, and not the "counts".&lt;/P&gt;

&lt;P&gt;For example, the statement "&lt;CODE&gt;dual | stats count by host | where count &amp;gt; 50&lt;/CODE&gt;" gives me a list of any device with greater than 50 hits of the word "dual".  In the results window, it shows the list of routers and their counts...which is still useful data, but not what I'm looking for.&lt;/P&gt;

&lt;P&gt;I'm looking for the results in the window to be the actual syslog messages...without having to click something else first.&lt;/P&gt;

&lt;P&gt;Is this possible?  Seems like it should be simple, and I've tried many iterations of commands, but haven't come up with the right way to do it.&lt;/P&gt;

&lt;P&gt;Thanks!!&lt;/P&gt;</description>
      <pubDate>Sat, 05 Feb 2011 00:28:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-results-based-on-stats/m-p/39184#M8935</guid>
      <dc:creator>mmletzko</dc:creator>
      <dc:date>2011-02-05T00:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: Query results based on stats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-results-based-on-stats/m-p/39185#M8936</link>
      <description>&lt;P&gt;Sounds like you want ALL the  events from the hosts that have 'dual' in their events more than 50 times?&lt;/P&gt;

&lt;P&gt;If so, then you can do this with a subsearch, like so:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;* [dual | stats count by host | where count &amp;gt; 50 | fields host]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Since in this case the events you want are a subset of the same events you're getting off disk in the subsearch, you can probably use &lt;CODE&gt;streamstats&lt;/CODE&gt; to kind of paint the 'counts' onto the events themselves and then just filter without ever transforming the rows. &lt;/P&gt;</description>
      <pubDate>Sat, 05 Feb 2011 01:11:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-results-based-on-stats/m-p/39185#M8936</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2011-02-05T01:11:21Z</dc:date>
    </item>
  </channel>
</rss>

