<?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: Group by responseCode in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Group-by-responseCode/m-p/52328#M179657</link>
    <description>&lt;P&gt;replace your stats command with:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval type=if(responseCode=="200","good","bad") | stats count avg(responeTime) by Request,type
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 06 Mar 2013 01:21:22 GMT</pubDate>
    <dc:creator>gkanapathy</dc:creator>
    <dc:date>2013-03-06T01:21:22Z</dc:date>
    <item>
      <title>Group by responseCode</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Group-by-responseCode/m-p/52327#M179656</link>
      <description>&lt;P&gt;Hi I have the following query that creates a report of the major transactions for a website with their count and average response time. I would like to seperate the count column into number requests that succeeded and requests that failed for each request type, i.e so divide this count column into requests with response code 200 and requests with response code of anything other than 200.&lt;/P&gt;

&lt;P&gt;index=vero_anzn_prod approveRiskRequest OR finalizeQuote OR premiumGrid OR approveRiskAccept OR illustration OR archiveRisks OR premiumInstallments OR add OR recalculateRates OR cancelPolicy OR completeScenario OR search OR save OR getPDF NOT (uri=&lt;EM&gt;.js OR uri=&lt;/EM&gt;.png OR uri=&lt;EM&gt;.css OR uri=&lt;/EM&gt;.gif OR uri=&lt;EM&gt;.ico OR uri=&lt;/EM&gt;.jpg)&lt;BR /&gt;
| rex field=uri_path mode=sed "s/quote\/[0-9]+/quote\/QUOTENO/" &lt;BR /&gt;
.&lt;BR /&gt;
.&lt;BR /&gt;
.&lt;BR /&gt;
| rex field=uri_path mode=sed "s/referralHistory\/.*\//referralHistory\/REFHSEARCH\//"&lt;BR /&gt;
| eval Request=uri_path.method&lt;BR /&gt;
| stats count avg(responseTime) BY Request&lt;/P&gt;

&lt;P&gt;I realize I could add responseCode to the BY part of the query but this doesn't give me exactly what I want.&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;

&lt;P&gt;Tam.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:26:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Group-by-responseCode/m-p/52327#M179656</guid>
      <dc:creator>tamnor</dc:creator>
      <dc:date>2020-09-28T13:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: Group by responseCode</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Group-by-responseCode/m-p/52328#M179657</link>
      <description>&lt;P&gt;replace your stats command with:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval type=if(responseCode=="200","good","bad") | stats count avg(responeTime) by Request,type
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Mar 2013 01:21:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Group-by-responseCode/m-p/52328#M179657</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2013-03-06T01:21:22Z</dc:date>
    </item>
  </channel>
</rss>

