<?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 track maximum overlapping transactions? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-track-maximum-overlapping-transactions/m-p/192483#M55348</link>
    <description>&lt;P&gt;I see. Well, in your original query you're always getting a zero because the &lt;CODE&gt;transaction&lt;/CODE&gt; command bunches each +1 event together with a -1 event, cancelling each other out. Your approach basically calculates the transaction manually, so you should leave out the &lt;CODE&gt;transaction&lt;/CODE&gt; command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search | eval +1, -1 | streamstats | stats
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I left out the &lt;CODE&gt;eventstats&lt;/CODE&gt; because calculating &lt;CODE&gt;max(max(c))&lt;/CODE&gt; doesn't make it any "maximumer".&lt;/P&gt;</description>
    <pubDate>Fri, 22 Aug 2014 20:39:06 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2014-08-22T20:39:06Z</dc:date>
    <item>
      <title>How to track maximum overlapping transactions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-track-maximum-overlapping-transactions/m-p/192480#M55345</link>
      <description>&lt;P&gt;I maintain a set of charts that keep track of REST APIs which create and delete resources (documents). In this particular case, tracking the maximum number of "open" documents, where a PUT creates the resource, and DELETE removes the resource. The search i attempted was: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;uri_path=*docs* (method=PUT OR method=DELETE) |   
eval s=case(method=="PUT",1,method=="DELETE",-1) |
transaction documentid maxspan=24h 
startswith="method==PUT" endswith="method=DELETE" connected=t unifyends=t keepevicted=true | 
streamstats sum(s) as c by clientid | 
eventstats max(c) as mcc by clientid |
stats  max(mcc) as MaxOpenDocs by clientid
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;however, MaxOpenDocs is always 0 (which is clearly wrong). My initial thought was to use accum, but it lacks a by clause. Any recommendations? Clearly I am missing something.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Aug 2014 18:18:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-track-maximum-overlapping-transactions/m-p/192480#M55345</guid>
      <dc:creator>peterd</dc:creator>
      <dc:date>2014-08-22T18:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to track maximum overlapping transactions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-track-maximum-overlapping-transactions/m-p/192481#M55346</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search | transaction documentid ... | concurrency duration=duration
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That'll use the duration field produced by the transaction command along with the start time stamp and compute a concurrency field. I think that field is what you're looking for.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.3/SearchReference/concurrency"&gt;http://docs.splunk.com/Documentation/Splunk/6.1.3/SearchReference/concurrency&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Aug 2014 19:02:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-track-maximum-overlapping-transactions/m-p/192481#M55346</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-08-22T19:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to track maximum overlapping transactions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-track-maximum-overlapping-transactions/m-p/192482#M55347</link>
      <description>&lt;P&gt;Thanks, but the concurrency command calculates the number of simultaneous event start times. According to the documentation:&lt;/P&gt;

&lt;P&gt;"Concurrency is the number of events that occurred simultaneously at the start time of the event, not the number of events that occurred during any overlap."&lt;/P&gt;

&lt;P&gt;.. and i need that "overlap" count. e.g. the maximum number of overlapping transactions by clientid.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Aug 2014 19:10:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-track-maximum-overlapping-transactions/m-p/192482#M55347</guid>
      <dc:creator>peterd</dc:creator>
      <dc:date>2014-08-22T19:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to track maximum overlapping transactions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-track-maximum-overlapping-transactions/m-p/192483#M55348</link>
      <description>&lt;P&gt;I see. Well, in your original query you're always getting a zero because the &lt;CODE&gt;transaction&lt;/CODE&gt; command bunches each +1 event together with a -1 event, cancelling each other out. Your approach basically calculates the transaction manually, so you should leave out the &lt;CODE&gt;transaction&lt;/CODE&gt; command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search | eval +1, -1 | streamstats | stats
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I left out the &lt;CODE&gt;eventstats&lt;/CODE&gt; because calculating &lt;CODE&gt;max(max(c))&lt;/CODE&gt; doesn't make it any "maximumer".&lt;/P&gt;</description>
      <pubDate>Fri, 22 Aug 2014 20:39:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-track-maximum-overlapping-transactions/m-p/192483#M55348</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-08-22T20:39:06Z</dc:date>
    </item>
  </channel>
</rss>

