<?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 get a count of active transactions to visualize in timechart? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-count-of-active-transactions-to-visualize-in/m-p/145184#M40433</link>
    <description>&lt;P&gt;YES! that is exactly what I'm trying to do, still having troubles get it working with gentimes, eval, append and concurrency, lacking some experience.&lt;/P&gt;</description>
    <pubDate>Mon, 20 Apr 2015 10:40:22 GMT</pubDate>
    <dc:creator>giovere</dc:creator>
    <dc:date>2015-04-20T10:40:22Z</dc:date>
    <item>
      <title>How to get a count of active transactions to visualize in timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-count-of-active-transactions-to-visualize-in/m-p/145178#M40427</link>
      <description>&lt;P&gt;I have a transactions defined by users logging in and out.&lt;/P&gt;

&lt;P&gt;The Goal is to have a timechart showing count of active transactions at the end of an hour or 10 minutes (total and by user)&lt;BR /&gt;
Any ideas how to get this?&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/316i831A0107510CC652/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt; &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| transaction UserId startswith="login" endswith="logout" | timechart count by UserId
| transaction UserId startswith="login" endswith="logout" | timechart count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks  in advance&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2015 08:01:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-count-of-active-transactions-to-visualize-in/m-p/145178#M40427</guid>
      <dc:creator>giovere</dc:creator>
      <dc:date>2015-04-16T08:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a count of active transactions to visualize in timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-count-of-active-transactions-to-visualize-in/m-p/145179#M40428</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | transaction UserId startswith="login" endswith="logout" | 
concurrency duration=duration | 
timechart max(concurrency)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;... should do the job.&lt;/P&gt;

&lt;P&gt;Cheers,&lt;/P&gt;

&lt;P&gt;Andreas&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2015 09:33:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-count-of-active-transactions-to-visualize-in/m-p/145179#M40428</guid>
      <dc:creator>schose</dc:creator>
      <dc:date>2015-04-16T09:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a count of active transactions to visualize in timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-count-of-active-transactions-to-visualize-in/m-p/145180#M40429</link>
      <description>&lt;P&gt;Thanks Andreas for the answer, your command returns for me the count of events only at the beginning of transaction. For example if I have a transaction starting at 9:00 lasting till 17:00 it would show only count 1 at 9:00 and rest is zero.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2015 10:05:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-count-of-active-transactions-to-visualize-in/m-p/145180#M40429</guid>
      <dc:creator>giovere</dc:creator>
      <dc:date>2015-04-16T10:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a count of active transactions to visualize in timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-count-of-active-transactions-to-visualize-in/m-p/145181#M40430</link>
      <description>&lt;P&gt;Hi giovere&lt;BR /&gt;
Try this search code And let me known if it work like you want&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;........| transaction UserId startswith="login" endswith="logout" | timechart  span=1h count by UserId
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Apr 2015 23:00:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-count-of-active-transactions-to-visualize-in/m-p/145181#M40430</guid>
      <dc:creator>chimell</dc:creator>
      <dc:date>2015-04-16T23:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a count of active transactions to visualize in timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-count-of-active-transactions-to-visualize-in/m-p/145182#M40431</link>
      <description>&lt;P&gt;hello Chimell&lt;BR /&gt;
Your solution has the same limitation as Schose's. It charts only start time of the transaction.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2015 05:36:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-count-of-active-transactions-to-visualize-in/m-p/145182#M40431</guid>
      <dc:creator>giovere</dc:creator>
      <dc:date>2015-04-20T05:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a count of active transactions to visualize in timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-count-of-active-transactions-to-visualize-in/m-p/145183#M40432</link>
      <description>&lt;P&gt;I think you want to count the &lt;A href="http://answers.splunk.com/answers/69213/calculate-concurrency-of-transactions.html"&gt;concurrency&lt;/A&gt; of your transactions.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2015 06:48:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-count-of-active-transactions-to-visualize-in/m-p/145183#M40432</guid>
      <dc:creator>jeffland</dc:creator>
      <dc:date>2015-04-20T06:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a count of active transactions to visualize in timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-count-of-active-transactions-to-visualize-in/m-p/145184#M40433</link>
      <description>&lt;P&gt;YES! that is exactly what I'm trying to do, still having troubles get it working with gentimes, eval, append and concurrency, lacking some experience.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2015 10:40:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-count-of-active-transactions-to-visualize-in/m-p/145184#M40433</guid>
      <dc:creator>giovere</dc:creator>
      <dc:date>2015-04-20T10:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a count of active transactions to visualize in timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-count-of-active-transactions-to-visualize-in/m-p/529026#M149357</link>
      <description>&lt;P&gt;I know that this doesn't directly answer the question your asking, but it is the closest I've found.&amp;nbsp; Rather than visualizing the # of active transactions, I've visualized the "cost" of the transactions which translates to the sum of the durations where they show up by start time instead of end time.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...some search that includes duration in milliseconds...&lt;BR /&gt;| eval _time=_time-(duration/1000)&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;|&amp;nbsp;timechart sum(duration) as durationSum&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2020 19:38:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-count-of-active-transactions-to-visualize-in/m-p/529026#M149357</guid>
      <dc:creator>pabstec</dc:creator>
      <dc:date>2020-11-11T19:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a count of active transactions to visualize in timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-count-of-active-transactions-to-visualize-in/m-p/599504#M208676</link>
      <description>&lt;P&gt;For those that came here (like me) in need for a solution, the trick I've found was to create mvfields with the span value and then mvexpand them and then do a distinct count by txid in the timechart..&lt;BR /&gt;&lt;BR /&gt;So from original poster's question, lets assume we are there, and have duration in seconds created by the transaction command:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| transaction UserId startswith="login" endswith="logout"&lt;/LI-CODE&gt;&lt;P&gt;Lets suppose that UserId is unique enough to be a TxId.&lt;BR /&gt;&lt;BR /&gt;So we want to do a count of how many concurrent Tx's are at a particular timeslot of 1s:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval events=mvrange(0,duration,1)
| fillnull events
| mvexpand events&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Now we have created on each event a # of lines with an increasing value of 1 from 0 to duration, and we are going to use that to offset each _time by that amount of seconds:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval _time=_time+events
| timechart dc(UserId) span=1s&lt;/LI-CODE&gt;&lt;P&gt;And finally we do a distinct count of the TxId.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;In theory we should have and actual event per time slot to be able to to a timechart that counts active transactions by their duration.&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 21:19:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-count-of-active-transactions-to-visualize-in/m-p/599504#M208676</guid>
      <dc:creator>rafaelsalazar</dc:creator>
      <dc:date>2022-05-26T21:19:49Z</dc:date>
    </item>
  </channel>
</rss>

