<?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 by generating inconsistent result in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/stats-count-by-generating-inconsistent-result/m-p/513082#M143955</link>
    <description>&lt;P&gt;Very simple suggestion, but are you certain that the events within the time window you're using contain status=500?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, out of curiosity, I'm not familiar with what the "P" &lt;EM&gt;(?&lt;U&gt;&lt;STRONG&gt;P&lt;/STRONG&gt;&lt;/U&gt;&amp;lt;status&amp;gt;\d+)&lt;/EM&gt;&amp;nbsp;in your name capture represents.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 07 Aug 2020 19:08:47 GMT</pubDate>
    <dc:creator>oscar84x</dc:creator>
    <dc:date>2020-08-07T19:08:47Z</dc:date>
    <item>
      <title>stats count by generating inconsistent result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-count-by-generating-inconsistent-result/m-p/513077#M143952</link>
      <description>&lt;P class="p1"&gt;I have a very simple search:&lt;/P&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;index=logs_glbl sourcetype=kube:container:app-name namespace=prod status=500 | stats count&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="p1"&gt;Result: 1&lt;/P&gt;&lt;P class="p1"&gt;Results are coming from below sample logs:&lt;/P&gt;&lt;P class="p1"&gt;::ffff:10.244.3.38 - - [06/Aug/2020:20:14:03 +0000] "GET /api/v1/workspace/getEngagement2?id=123 HTTP/1.1" &lt;STRONG&gt;500&lt;/STRONG&gt; 39 "&lt;A href="https://atlas-us.pwclabs.pwcglb.com/engagement_2020-08-05t16:21:21.835z_02a/home/digitalAssets" target="_blank" rel="noopener"&gt;https://atlas.intenal.noman.com&lt;/A&gt;" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36"&lt;/P&gt;&lt;P class="p1"&gt;I have defined a Field type: &lt;STRONG&gt;status&lt;/STRONG&gt; for the above which uses Inline Field Extraction:&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;^[^"\n]*"(?P&amp;lt;method&amp;gt;\w+)[^"\n]*"\s+(?P&amp;lt;status&amp;gt;\d+)&lt;/P&gt;&lt;P class="p1"&gt;Now when I perform a new search&lt;/P&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;index=logs_glbl sourcetype=kube:container:app-name namespace=prod | stats count by status&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="p1"&gt;I don’t get the status 500 error. My results exclude the 500 status. It is also probably missing other http statuses too.&lt;/P&gt;&lt;TABLE cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;status&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;count&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class="p1"&gt;200&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P class="p1"&gt;515&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class="p1"&gt;302&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P class="p1"&gt;152&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class="p1"&gt;304&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P class="p1"&gt;8&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class="p1"&gt;401&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P class="p1"&gt;71&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class="p1"&gt;409&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P class="p1"&gt;7&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 07 Aug 2020 18:48:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-count-by-generating-inconsistent-result/m-p/513077#M143952</guid>
      <dc:creator>noman377</dc:creator>
      <dc:date>2020-08-07T18:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: stats count by generating inconsistent result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-count-by-generating-inconsistent-result/m-p/513082#M143955</link>
      <description>&lt;P&gt;Very simple suggestion, but are you certain that the events within the time window you're using contain status=500?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, out of curiosity, I'm not familiar with what the "P" &lt;EM&gt;(?&lt;U&gt;&lt;STRONG&gt;P&lt;/STRONG&gt;&lt;/U&gt;&amp;lt;status&amp;gt;\d+)&lt;/EM&gt;&amp;nbsp;in your name capture represents.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Aug 2020 19:08:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-count-by-generating-inconsistent-result/m-p/513082#M143955</guid>
      <dc:creator>oscar84x</dc:creator>
      <dc:date>2020-08-07T19:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: stats count by generating inconsistent result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-count-by-generating-inconsistent-result/m-p/513085#M143956</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/109006"&gt;@oscar84x&lt;/a&gt;&amp;nbsp;:: Yes. Within the same time frame (e.g., Last 24 hours, Last 7 days), I'm seeing search results that are not consistent. However, The alerts I receive based on "status" is accurate. To extract the http status, like 200, 500 etc., I used the regular expression to create the "status" field extraction.&amp;nbsp;&lt;BR /&gt;Since, "| stats count by status" does not bring the 500 statuses, my dashboard is off not much use.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Aug 2020 19:35:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-count-by-generating-inconsistent-result/m-p/513085#M143956</guid>
      <dc:creator>noman377</dc:creator>
      <dc:date>2020-08-07T19:35:04Z</dc:date>
    </item>
  </channel>
</rss>

