<?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 add an average transaction duration overlay to a timechart with a split by clause? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-an-average-transaction-duration-overlay-to-a/m-p/177464#M51033</link>
    <description>&lt;P&gt;Thanks for the quick response. Not sure how this works, but it does.&lt;/P&gt;</description>
    <pubDate>Fri, 07 Nov 2014 19:23:34 GMT</pubDate>
    <dc:creator>bradj013</dc:creator>
    <dc:date>2014-11-07T19:23:34Z</dc:date>
    <item>
      <title>How to add an average transaction duration overlay to a timechart with a split by clause?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-an-average-transaction-duration-overlay-to-a/m-p/177462#M51031</link>
      <description>&lt;P&gt;Splunk=6.1.4&lt;/P&gt;

&lt;P&gt;My search looks like this:&lt;BR /&gt;
 | transaction TransID keepevicted=true | search eventcount=2 | timechart limit=0 span=1m max(duration) by host&lt;/P&gt;

&lt;P&gt;Trying to add an average transaction duration overlay (global not by host) to the chart by adding to the search term: "| eventstats avg(max(duration)) as average | eval average=round(average,0)" and selecting "average" as the overlay value. The overlay is blank.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Oct 2014 19:43:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-an-average-transaction-duration-overlay-to-a/m-p/177462#M51031</guid>
      <dc:creator>bradj013</dc:creator>
      <dc:date>2014-10-30T19:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to add an average transaction duration overlay to a timechart with a split by clause?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-an-average-transaction-duration-overlay-to-a/m-p/177463#M51032</link>
      <description>&lt;P&gt;Your search is shooting blanks because there is no field &lt;CODE&gt;duration&lt;/CODE&gt; in the results of your &lt;CODE&gt;timechart&lt;/CODE&gt;. Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | timechart ... by host | eval _count = 0 | foreach * [eval _count = _count + 1] | addtotals fieldname=_total | eval average = _total / _count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Configure the chart to overlay the field &lt;CODE&gt;average&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Oct 2014 20:25:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-an-average-transaction-duration-overlay-to-a/m-p/177463#M51032</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-10-30T20:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to add an average transaction duration overlay to a timechart with a split by clause?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-an-average-transaction-duration-overlay-to-a/m-p/177464#M51033</link>
      <description>&lt;P&gt;Thanks for the quick response. Not sure how this works, but it does.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Nov 2014 19:23:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-an-average-transaction-duration-overlay-to-a/m-p/177464#M51033</guid>
      <dc:creator>bradj013</dc:creator>
      <dc:date>2014-11-07T19:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to add an average transaction duration overlay to a timechart with a split by clause?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-an-average-transaction-duration-overlay-to-a/m-p/177465#M51034</link>
      <description>&lt;P&gt;Heh. A little walk-through: You have fields named after your hosts, so you can't access one field called &lt;CODE&gt;duration&lt;/CODE&gt;. Calculating an average is the same as calculating a sum and a count, then dividing the two. That's what I'm doing here:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;set up the counter&lt;/LI&gt;
&lt;LI&gt;count how many fields (hosts) you have&lt;/LI&gt;
&lt;LI&gt;sum up the values&lt;/LI&gt;
&lt;LI&gt;divide the two&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;All that is done with &lt;CODE&gt;_fieldnames&lt;/CODE&gt; starting with an underscore, so there's no need to hide them using &lt;CODE&gt;fields - _count _total&lt;/CODE&gt; because the chart doesn't see them anyway... yeah, I'm lazy.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Nov 2014 19:42:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-an-average-transaction-duration-overlay-to-a/m-p/177465#M51034</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-11-07T19:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to add an average transaction duration overlay to a timechart with a split by clause?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-an-average-transaction-duration-overlay-to-a/m-p/177466#M51035</link>
      <description>&lt;P&gt;Laziness in success drives efficiency.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2015 22:30:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-an-average-transaction-duration-overlay-to-a/m-p/177466#M51035</guid>
      <dc:creator>landen99</dc:creator>
      <dc:date>2015-08-05T22:30:03Z</dc:date>
    </item>
  </channel>
</rss>

