<?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 seperate status based on response time values ? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-seperate-status-based-on-response-time-values/m-p/339938#M100812</link>
    <description>&lt;P&gt;Try this - implemented @somesoni2's suggestions, removed the redundant second test against 15, which must always be true,   removed the redundant final &lt;CODE&gt;stats&lt;/CODE&gt; command in favor of just renaming the &lt;CODE&gt;range&lt;/CODE&gt; field, also set final &lt;CODE&gt;| where&lt;/CODE&gt; to lower case.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search
    | eval responseTime=TransactionEndtime-TransactionStartTime
    | eval responseTime=round((responseTime/1000),3)
    | stats avg(responseTime) as "avgResponseTime" by Category,Verb
    | eval respTimeStatus=case(avgResponseTime&amp;gt;15,25, avgResponseTime&amp;gt;=7,15, true(),5 ) 
    | rangemap field=respTimeStatus Low=0-10 Amber=11-20 Severe=21-30
    | rename range as Status
    | where (Status="Amber" OR Status="Severe")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 01 Aug 2017 17:28:07 GMT</pubDate>
    <dc:creator>DalJeanis</dc:creator>
    <dc:date>2017-08-01T17:28:07Z</dc:date>
    <item>
      <title>How to seperate status based on response time values ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-seperate-status-based-on-response-time-values/m-p/339936#M100810</link>
      <description>&lt;P&gt;I need only amber and severe but i am not getting any result &lt;/P&gt;

&lt;P&gt;base search|eval responseTime=TransactionEndtime-TransactionStartTime|eval responseTime=round((responseTime/1000),3)| stats avg(responseTime) as "avgResponseTime" by Category,Verb|eval respTimeStatus=if(avgResponseTime&amp;gt;15,"25",(if(avgResponseTime&amp;gt;=7 AND avgResponseTime&amp;lt;=15,"15","5"))) |rangemap field=respTimeStatus Low=0-10 Amber=11-20 Severe=21-30|stats values(range) as Status values(avgResponseTime) as avgResponseTime by Category,Verb|Where (Status="Amber" OR Status="Severe")&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2017 12:46:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-seperate-status-based-on-response-time-values/m-p/339936#M100810</guid>
      <dc:creator>karthi2809</dc:creator>
      <dc:date>2017-08-01T12:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to seperate status based on response time values ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-seperate-status-based-on-response-time-values/m-p/339937#M100811</link>
      <description>&lt;P&gt;The &lt;CODE&gt;rangemap&lt;/CODE&gt; command expects numeric values, but you have text values.  Try removing the quotation marks from your &lt;CODE&gt;if&lt;/CODE&gt; statement. Also, consider using &lt;CODE&gt;case&lt;/CODE&gt; instead of nested ifs as it's easier to read.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2017 16:42:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-seperate-status-based-on-response-time-values/m-p/339937#M100811</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2017-08-01T16:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to seperate status based on response time values ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-seperate-status-based-on-response-time-values/m-p/339938#M100812</link>
      <description>&lt;P&gt;Try this - implemented @somesoni2's suggestions, removed the redundant second test against 15, which must always be true,   removed the redundant final &lt;CODE&gt;stats&lt;/CODE&gt; command in favor of just renaming the &lt;CODE&gt;range&lt;/CODE&gt; field, also set final &lt;CODE&gt;| where&lt;/CODE&gt; to lower case.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search
    | eval responseTime=TransactionEndtime-TransactionStartTime
    | eval responseTime=round((responseTime/1000),3)
    | stats avg(responseTime) as "avgResponseTime" by Category,Verb
    | eval respTimeStatus=case(avgResponseTime&amp;gt;15,25, avgResponseTime&amp;gt;=7,15, true(),5 ) 
    | rangemap field=respTimeStatus Low=0-10 Amber=11-20 Severe=21-30
    | rename range as Status
    | where (Status="Amber" OR Status="Severe")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Aug 2017 17:28:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-seperate-status-based-on-response-time-values/m-p/339938#M100812</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-08-01T17:28:07Z</dc:date>
    </item>
  </channel>
</rss>

