<?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: How to display table of total error status code and total success status code by host? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-table-of-total-error-status-code-and-total/m-p/601322#M209282</link>
    <description>&lt;P&gt;maybe if you replace "sum" by "count"&lt;/P&gt;</description>
    <pubDate>Fri, 10 Jun 2022 09:27:16 GMT</pubDate>
    <dc:creator>rrovers</dc:creator>
    <dc:date>2022-06-10T09:27:16Z</dc:date>
    <item>
      <title>How to display table of total error status code and total success status code by host?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-table-of-total-error-status-code-and-total/m-p/601226#M209255</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am a newbie in Splunk. I have to write a splunk query to get the status_code count for error(status range 300 and above) and success(status range 200-299) by host.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This is my current search(24 hrs) but unfortunately return 0 result except for host list displayed&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;index=xxxx&amp;nbsp; host=*&amp;nbsp; status=*&lt;BR /&gt;| stats count(status&amp;gt;=300) as "Error",&lt;BR /&gt;count(status&amp;lt;299) as "OK" by host&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Expected result:&lt;/P&gt;&lt;P&gt;Host&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Error&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | OK&lt;/P&gt;&lt;P&gt;----------------------------------------&lt;/P&gt;&lt;P&gt;xxxx&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 23&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; 1&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2022 15:49:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-table-of-total-error-status-code-and-total/m-p/601226#M209255</guid>
      <dc:creator>aa0</dc:creator>
      <dc:date>2022-06-09T15:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to display table of total error status code and total success status code by host?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-table-of-total-error-status-code-and-total/m-p/601244#M209260</link>
      <description>&lt;P&gt;To evaluate an expression in &lt;FONT face="courier new,courier"&gt;stats&lt;/FONT&gt; you must use the &lt;FONT face="courier new,courier"&gt;eval&lt;/FONT&gt; function within the aggregation function.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=xxxx  host=*  status=*
| stats sum(eval(status&amp;gt;=300)) as "Error", sum(eval(status&amp;lt;299)) as "OK" by host&lt;/LI-CODE&gt;&lt;P&gt;I changed &lt;FONT face="courier new,courier"&gt;count&lt;/FONT&gt; to &lt;FONT face="georgia,palatino"&gt;sum&lt;/FONT&gt; because the &lt;FONT face="courier new,courier"&gt;eval&lt;/FONT&gt; function always returns either 0 or 1 so &lt;FONT face="courier new,courier"&gt;count&lt;/FONT&gt; will only tell you how many evaluations were done.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2022 18:45:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-table-of-total-error-status-code-and-total/m-p/601244#M209260</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-06-09T18:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to display table of total error status code and total success status code by host?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-table-of-total-error-status-code-and-total/m-p/601316#M209280</link>
      <description>&lt;P&gt;Thanks for your reply! I've tried the command but it still didn't did the trick, list of hosts is there but the total error and total success are missing somewhere&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 08:18:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-table-of-total-error-status-code-and-total/m-p/601316#M209280</guid>
      <dc:creator>aa0</dc:creator>
      <dc:date>2022-06-10T08:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to display table of total error status code and total success status code by host?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-table-of-total-error-status-code-and-total/m-p/601322#M209282</link>
      <description>&lt;P&gt;maybe if you replace "sum" by "count"&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 09:27:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-table-of-total-error-status-code-and-total/m-p/601322#M209282</guid>
      <dc:creator>rrovers</dc:creator>
      <dc:date>2022-06-10T09:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to display table of total error status code and total success status code by host?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-table-of-total-error-status-code-and-total/m-p/601343#M209286</link>
      <description>&lt;P&gt;Make sure there are no spaces in the &lt;FONT face="courier new,courier"&gt;sum &lt;/FONT&gt;clauses.&amp;nbsp; I've had them fail when I put a space before a "(".&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 12:26:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-table-of-total-error-status-code-and-total/m-p/601343#M209286</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-06-10T12:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to display table of total error status code and total success status code by host?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-table-of-total-error-status-code-and-total/m-p/601387#M209301</link>
      <description>&lt;P&gt;Thanks guys, solved!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 16:18:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-table-of-total-error-status-code-and-total/m-p/601387#M209301</guid>
      <dc:creator>aa0</dc:creator>
      <dc:date>2022-06-10T16:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to display table of total error status code and total success status code by host?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-table-of-total-error-status-code-and-total/m-p/601389#M209303</link>
      <description>&lt;P&gt;If your problem is resolved, then please click the "Accept as Solution" button to help future readers.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 17:02:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-table-of-total-error-status-code-and-total/m-p/601389#M209303</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-06-10T17:02:28Z</dc:date>
    </item>
  </channel>
</rss>

