<?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 How do you find the avg time of transactions where the duration is longer than normal? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-find-the-avg-time-of-transactions-where-the-duration/m-p/308882#M92625</link>
    <description>&lt;P&gt;Hi! I'm trying to get the avg time of transactions where the duration is longer than normal. I can successfully do what I want in a appendcols clause, but it feels like hard work for something simple. The appendcols is added at the end to show you what I wanted to do.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ourindex APIRequestStart OR APIRequestStop 
| transaction uuid startswith="* - APIRequestStart" endswith="* - APIRequestStop" 
| timechart count(eval(duration&amp;gt;2)) AS "Number Slow Transactions", **avg(eval(duration&amp;gt;2)) AS "Avg Slow Transactions"**, count AS "Total Transactions", avg(duration) AS "Avg Transactions" span=1h 

| appendcols [search index=index_cesoa* APIRequestStart OR APIRequestStop 
| transaction uuid startswith="* - APIRequestStart" endswith="* - APIRequestStop" 
| where duration &amp;gt; 2 
| timechart avg(duration) AS "Working Avg Slow Transactions" span=1h]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 17 Oct 2017 00:54:18 GMT</pubDate>
    <dc:creator>WarpedMonkey</dc:creator>
    <dc:date>2017-10-17T00:54:18Z</dc:date>
    <item>
      <title>How do you find the avg time of transactions where the duration is longer than normal?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-find-the-avg-time-of-transactions-where-the-duration/m-p/308882#M92625</link>
      <description>&lt;P&gt;Hi! I'm trying to get the avg time of transactions where the duration is longer than normal. I can successfully do what I want in a appendcols clause, but it feels like hard work for something simple. The appendcols is added at the end to show you what I wanted to do.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ourindex APIRequestStart OR APIRequestStop 
| transaction uuid startswith="* - APIRequestStart" endswith="* - APIRequestStop" 
| timechart count(eval(duration&amp;gt;2)) AS "Number Slow Transactions", **avg(eval(duration&amp;gt;2)) AS "Avg Slow Transactions"**, count AS "Total Transactions", avg(duration) AS "Avg Transactions" span=1h 

| appendcols [search index=index_cesoa* APIRequestStart OR APIRequestStop 
| transaction uuid startswith="* - APIRequestStart" endswith="* - APIRequestStop" 
| where duration &amp;gt; 2 
| timechart avg(duration) AS "Working Avg Slow Transactions" span=1h]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Oct 2017 00:54:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-find-the-avg-time-of-transactions-where-the-duration/m-p/308882#M92625</guid>
      <dc:creator>WarpedMonkey</dc:creator>
      <dc:date>2017-10-17T00:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do you find the avg time of transactions where the duration is longer than normal?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-find-the-avg-time-of-transactions-where-the-duration/m-p/308883#M92626</link>
      <description>&lt;P&gt;can you do this instead:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ourindex APIRequestStart OR APIRequestStop 
| transaction uuid startswith=" - APIRequestStart" endswith=" - APIRequestStop" 
|eval durationGT2=if(duration&amp;gt;2,duration,null())
| timechart count(durationGT2) AS "Number Slow Transactions", avg(durationGT2) AS "Avg Slow Transactions", count AS "Total Transactions", avg(duration) AS "Avg Transactions" span=1h
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;just add an eval to grab the durations you're looking for&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 11:45:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-find-the-avg-time-of-transactions-where-the-duration/m-p/308883#M92626</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2017-10-17T11:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: How do you find the avg time of transactions where the duration is longer than normal?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-find-the-avg-time-of-transactions-where-the-duration/m-p/308884#M92627</link>
      <description>&lt;P&gt;Perfect! I knew it was dead easy. Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 13:39:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-find-the-avg-time-of-transactions-where-the-duration/m-p/308884#M92627</guid>
      <dc:creator>WarpedMonkey</dc:creator>
      <dc:date>2017-10-17T13:39:26Z</dc:date>
    </item>
  </channel>
</rss>

