<?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 Getting Transaction Times Without Transaction Command in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Getting-Transaction-Times-Without-Transaction-Command/m-p/139170#M38235</link>
    <description>&lt;P&gt;Hi, I'm working on speeding up searches that I initially wrote using the &lt;EM&gt;transaction&lt;/EM&gt; command.&lt;/P&gt;

&lt;P&gt;A transaction is defined in my case as two different timestamped events (each event has 2 data lines). I want to get the average transaction time of all transactions occurring in a 10min period, which I can do with this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;data&amp;gt; | transaction transID maxevents=2 | timechart span=10m avg(duration)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm attempting to avoid the transaction command in order to use auto-acceleration and speed-up execution time. My best attempt so far is the following (based on the Splunk doc example):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;data&amp;gt; | stats min(_time) AS start max(_time) AS end by transID | eval RTT=end-start | eval t=strftime(start, "%m/%d/%y %H:%M:%S") | table t, RTT | chart avg(RTT) by t
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;which might be a little redundant but gets me the following output:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Timestamp                    avg(RTT)
11/12/13 11:18:00            0.10945
11/12/13 11:18:01            0.13556
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'd like to somehow chart this over time like the transaction command.&lt;/P&gt;

&lt;P&gt;Can someone point me in the right direction? I thought the timechart command could be used if the first column of data is a timestamp but all my combinations of chart/timechart return "No Results Found".&lt;/P&gt;</description>
    <pubDate>Tue, 12 Nov 2013 19:58:14 GMT</pubDate>
    <dc:creator>RMartinezDTV</dc:creator>
    <dc:date>2013-11-12T19:58:14Z</dc:date>
    <item>
      <title>Getting Transaction Times Without Transaction Command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Getting-Transaction-Times-Without-Transaction-Command/m-p/139170#M38235</link>
      <description>&lt;P&gt;Hi, I'm working on speeding up searches that I initially wrote using the &lt;EM&gt;transaction&lt;/EM&gt; command.&lt;/P&gt;

&lt;P&gt;A transaction is defined in my case as two different timestamped events (each event has 2 data lines). I want to get the average transaction time of all transactions occurring in a 10min period, which I can do with this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;data&amp;gt; | transaction transID maxevents=2 | timechart span=10m avg(duration)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm attempting to avoid the transaction command in order to use auto-acceleration and speed-up execution time. My best attempt so far is the following (based on the Splunk doc example):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;data&amp;gt; | stats min(_time) AS start max(_time) AS end by transID | eval RTT=end-start | eval t=strftime(start, "%m/%d/%y %H:%M:%S") | table t, RTT | chart avg(RTT) by t
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;which might be a little redundant but gets me the following output:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Timestamp                    avg(RTT)
11/12/13 11:18:00            0.10945
11/12/13 11:18:01            0.13556
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'd like to somehow chart this over time like the transaction command.&lt;/P&gt;

&lt;P&gt;Can someone point me in the right direction? I thought the timechart command could be used if the first column of data is a timestamp but all my combinations of chart/timechart return "No Results Found".&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2013 19:58:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Getting-Transaction-Times-Without-Transaction-Command/m-p/139170#M38235</guid>
      <dc:creator>RMartinezDTV</dc:creator>
      <dc:date>2013-11-12T19:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Transaction Times Without Transaction Command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Getting-Transaction-Times-Without-Transaction-Command/m-p/139171#M38236</link>
      <description>&lt;P&gt;No, what &lt;CODE&gt;timechart&lt;/CODE&gt; does is roughly this: "&lt;CODE&gt;bucket _time | chart somefunction(X) over _time&lt;/CODE&gt;". So it's got nothing to do with what is in the first column - &lt;CODE&gt;_time&lt;/CODE&gt; will always be used.&lt;/P&gt;

&lt;P&gt;Building on your example you could just switch the last &lt;CODE&gt;chart&lt;/CODE&gt; command for &lt;CODE&gt;bucket start | chart avg(RTT) over start by t&lt;/CODE&gt; if you want to get results over time.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2013 20:28:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Getting-Transaction-Times-Without-Transaction-Command/m-p/139171#M38236</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-11-12T20:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Transaction Times Without Transaction Command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Getting-Transaction-Times-Without-Transaction-Command/m-p/139172#M38237</link>
      <description>&lt;P&gt;Thanks so much!&lt;BR /&gt;
Between this advice and your comments on this thread about time format conversion: &lt;A href="http://answers.splunk.com/answers/52806/string-to-time-and-then-timechart"&gt;http://answers.splunk.com/answers/52806/string-to-time-and-then-timechart&lt;/A&gt;  I have &lt;EM&gt;exactly&lt;/EM&gt; what I need. I'll put my search query below for others to learn from.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2013 21:55:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Getting-Transaction-Times-Without-Transaction-Command/m-p/139172#M38237</guid>
      <dc:creator>RMartinezDTV</dc:creator>
      <dc:date>2013-11-12T21:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Transaction Times Without Transaction Command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Getting-Transaction-Times-Without-Transaction-Command/m-p/139173#M38238</link>
      <description>&lt;P&gt;&lt;DATA&gt; | stats min(_time) AS start max(_time) AS end by transID | eval RTT=end-start | eval _time=start | timechart avg(RTT)&lt;/DATA&gt;&lt;/P&gt;

&lt;P&gt;The key is to set the implicit _time field to be my calculated time field (called start). Then timechart works correctly. The bucketing idea works as well, but this is more concise.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:15:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Getting-Transaction-Times-Without-Transaction-Command/m-p/139173#M38238</guid>
      <dc:creator>RMartinezDTV</dc:creator>
      <dc:date>2020-09-28T15:15:52Z</dc:date>
    </item>
  </channel>
</rss>

