<?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: stats count not working in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/stats-count-not-working/m-p/453736#M128396</link>
    <description>&lt;P&gt;after you run &lt;CODE&gt;stats count as avg_count by _time&lt;/CODE&gt; there is no longer a field called 'host'&lt;/P&gt;

&lt;P&gt;You can resolve this by using &lt;CODE&gt;by _time, host&lt;/CODE&gt; instead.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ops host=Sr*xxxx* sourcetype=iislogs (HttpStatusCode=400 OR HttpStatusCode=401 OR HttpStatusCode=403 OR HttpStatusCode=404 OR HttpStatusCode=405) AND (*loadbalancer* OR *gateway* OR *IFT* OR *widget* ) NOT ( *.png OR *.gif OR *.css OR *fonts* OR *.txt OR *.gif OR *.ico OR *.jpg OR *.pdf OR *.exe OR *.cgi OR *.swf OR *.vmd OR *.xsl OR *.xml OR *qualy* OR *woff* OR *.bak OR *.png OR *.svg OR *.ttf OR *.ini OR *.temp OR *.data OR *.tar OR *curl* OR *.po OR *.mo OR *.tpl OR *.tmpl OR *script*) 
| bin _time span=5m 
| stats count as avg_count by _time, host
| where avg_count &amp;gt; 4 
| eval alert="'splunk:".host.";crit;welcome to splunk  Error ".host.";Process;rr_os;mmtt;tt_3'" 
| table alert
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 21 Mar 2019 11:42:59 GMT</pubDate>
    <dc:creator>nickhills</dc:creator>
    <dc:date>2019-03-21T11:42:59Z</dc:date>
    <item>
      <title>stats count not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-count-not-working/m-p/453735#M128395</link>
      <description>&lt;P&gt;Hi, I am trying to get a table type of alerting but I am not getting the output&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index = ops host = Sr*xxxx* sourcetype=iislogs (HttpStatusCode =400 OR  HttpStatusCode = 401 OR HttpStatusCode = 403 OR HttpStatusCode = 404 OR HttpStatusCode = 405) AND (*loadbalancer* OR *gateway* OR *IFT* OR *widget* ) NOT ( *.png OR *.gif OR *.css OR *fonts* OR *.txt OR *.gif OR *.ico OR *.jpg OR *.pdf OR *.exe OR *.cgi OR *.swf OR *.vmd OR *.xsl OR *.xml OR *qualy* OR *woff* OR *.bak OR *.png OR *.svg OR *.ttf OR *.ini OR *.temp OR *.data OR *.tar OR *curl* OR *.po OR *.mo OR *.tpl OR *.tmpl OR *script*) | bin _time span=5m |stats count as avg_count by _time | where avg_count &amp;gt; 4 | eval alert="'splunk:".host.";crit;welcome to splunk  Error ".host.";Process;rr_os;mmtt;tt_3'" | table alert
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am expecting a table form but I don't get anything. Could you please help.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Dinesh&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2019 11:28:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-count-not-working/m-p/453735#M128395</guid>
      <dc:creator>dbashyam</dc:creator>
      <dc:date>2019-03-21T11:28:53Z</dc:date>
    </item>
    <item>
      <title>Re: stats count not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-count-not-working/m-p/453736#M128396</link>
      <description>&lt;P&gt;after you run &lt;CODE&gt;stats count as avg_count by _time&lt;/CODE&gt; there is no longer a field called 'host'&lt;/P&gt;

&lt;P&gt;You can resolve this by using &lt;CODE&gt;by _time, host&lt;/CODE&gt; instead.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ops host=Sr*xxxx* sourcetype=iislogs (HttpStatusCode=400 OR HttpStatusCode=401 OR HttpStatusCode=403 OR HttpStatusCode=404 OR HttpStatusCode=405) AND (*loadbalancer* OR *gateway* OR *IFT* OR *widget* ) NOT ( *.png OR *.gif OR *.css OR *fonts* OR *.txt OR *.gif OR *.ico OR *.jpg OR *.pdf OR *.exe OR *.cgi OR *.swf OR *.vmd OR *.xsl OR *.xml OR *qualy* OR *woff* OR *.bak OR *.png OR *.svg OR *.ttf OR *.ini OR *.temp OR *.data OR *.tar OR *curl* OR *.po OR *.mo OR *.tpl OR *.tmpl OR *script*) 
| bin _time span=5m 
| stats count as avg_count by _time, host
| where avg_count &amp;gt; 4 
| eval alert="'splunk:".host.";crit;welcome to splunk  Error ".host.";Process;rr_os;mmtt;tt_3'" 
| table alert
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Mar 2019 11:42:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-count-not-working/m-p/453736#M128396</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2019-03-21T11:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: stats count not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-count-not-working/m-p/453737#M128397</link>
      <description>&lt;P&gt;yes that worked @nickhillscpl &lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2019 22:57:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-count-not-working/m-p/453737#M128397</guid>
      <dc:creator>dbashyam</dc:creator>
      <dc:date>2019-03-25T22:57:20Z</dc:date>
    </item>
  </channel>
</rss>

