<?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 find the totals of status codes per uri per day? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-totals-of-status-codes-per-uri-per-day/m-p/337476#M100144</link>
    <description>&lt;P&gt;you did the hardest part, once there are results filtering was easy.&lt;/P&gt;</description>
    <pubDate>Mon, 29 Jan 2018 09:41:58 GMT</pubDate>
    <dc:creator>Arjang</dc:creator>
    <dc:date>2018-01-29T09:41:58Z</dc:date>
    <item>
      <title>How to find the totals of status codes per uri per day?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-totals-of-status-codes-per-uri-per-day/m-p/337472#M100140</link>
      <description>&lt;P&gt;I am using the following search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;( sourcetype=iis ) sc_status=500 |stats count by  uri_path sc_status date
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but that only gives me the failures, I want the successes for them as well i.e. &lt;CODE&gt;sc_status=200 or other sc_status&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;If I try :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;( sourcetype=iis ) |stats count by  uri_path sc_status date
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get too many results that had never had 400, 500, i.e. the ur_path s  that always were successful,&lt;BR /&gt;
I just want the &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;( sourcetype=iis ) |stats count by  uri_path sc_status date
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;results sets that contain at least one &lt;CODE&gt;sc_status  &amp;gt;400&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I tried using join, inner join (1)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ( sourcetype=iis ) sc_status=500 |stats count by  uri_path sc_status date
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;with (2)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ( sourcetype=iis ) |stats count by  uri_path sc_status date
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I got this :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;( sourcetype=iis ) sc_status=500 |fields  uri_path | join uri_path [search sourcetype=iis | fields uri_path,sc_status,date ] | stats count by uri_path , sc_status , date| sort -count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but the result does not contain any &lt;CODE&gt;sc_status = 500&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;The result should be (2) where each one of the uri_path was in (1).&lt;BR /&gt;
That means &lt;CODE&gt;sc_status = 500&lt;/CODE&gt; should also be included in the final result.&lt;BR /&gt;
Maybe there is an alternative way of finding the totals of status codes per uri per day. I would be happy with just a result like so&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;uri_path,sc_"statusLessThan400","sc_statusGreaterThanOrEqualTo400",date
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:51:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-totals-of-status-codes-per-uri-per-day/m-p/337472#M100140</guid>
      <dc:creator>Arjang</dc:creator>
      <dc:date>2020-09-29T17:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the totals of status codes per uri per day?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-totals-of-status-codes-per-uri-per-day/m-p/337473#M100141</link>
      <description>&lt;P&gt;@Arjang, please try the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; sourcetype=iis ) sc_status=*
| stats count(eval(sc_status=200)) as Success count(eval(sc_status!=200)) as Failures by  uri_path sc_status date
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Jan 2018 08:33:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-totals-of-status-codes-per-uri-per-day/m-p/337473#M100141</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-01-29T08:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the totals of status codes per uri per day?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-totals-of-status-codes-per-uri-per-day/m-p/337474#M100142</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;

&lt;P&gt;I ended up using :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(sourcetype=iis ) sc_status=* CurrentWork | stats count(eval(sc_status=200)) as Success count(eval(sc_status!=200)) as Failures by  uri_path date | search Failures &amp;gt; 0 | fields uri_path, date, Success,Failures
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Jan 2018 08:52:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-totals-of-status-codes-per-uri-per-day/m-p/337474#M100142</guid>
      <dc:creator>Arjang</dc:creator>
      <dc:date>2018-01-29T08:52:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the totals of status codes per uri per day?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-totals-of-status-codes-per-uri-per-day/m-p/337475#M100143</link>
      <description>&lt;P&gt;Great... I am sorry I think I missed the second part of your question. Glad you figured it out &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2018 09:17:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-totals-of-status-codes-per-uri-per-day/m-p/337475#M100143</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-01-29T09:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the totals of status codes per uri per day?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-totals-of-status-codes-per-uri-per-day/m-p/337476#M100144</link>
      <description>&lt;P&gt;you did the hardest part, once there are results filtering was easy.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2018 09:41:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-the-totals-of-status-codes-per-uri-per-day/m-p/337476#M100144</guid>
      <dc:creator>Arjang</dc:creator>
      <dc:date>2018-01-29T09:41:58Z</dc:date>
    </item>
  </channel>
</rss>

