<?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 to use Transaction and the sum of the same name field in a rangemap and run stats? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-Transaction-and-the-sum-of-the-same-name-field-in-a/m-p/165107#M46907</link>
    <description>&lt;P&gt;Trying to use the sum of "docCount" in a transaction and use that value for the range and then run statistics by the range. The transaction is working as expected and get the correct logs entries. If I just run the command without worrying about the sum of docCounts the count and stats work as expected, but only get a docCount max of 50. When adding the sum(docCount), the count sums, but lose the ability to run stats on the "duration" field from the log.&lt;/P&gt;

&lt;P&gt;//Range counts properly, but no stats&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ts* Component=TS ("StartingJob" OR "Starting module=Commit" OR "FinishedJob") | transaction TSJobId startswith="StartingJob" endswith="FinishedJob" keepevicted=false | stats sum(docCount) as doccounter by TSJobId|rangemap field=doccounter "0-5Docs"=0-5, "6-10Docs"=6-10, "11-20Docs"=11-20, "21-30Docs"=21-30, "31-40Docs"=31-40, "41-50Docs"=41-50, "51-60"=51-60, "60-80"=60-80, default="&amp;gt;80Docs" | stats count, avg(duration), p75(duration), p80(duration), p90(duration), p95(duration) by range
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;//Stats work, but missing the actual docCount&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ts* Component=TS ("StartingJob" OR "Starting module=Commit" OR "FinishedJob") | transaction TSJobId startswith="StartingJob" endswith="FinishedJob" keepevicted=false | rangemap field=doccounter "0-5Docs"=0-5, "6-10Docs"=6-10, "11-20Docs"=11-20, "21-30Docs"=21-30, "31-40Docs"=31-40, "41-50Docs"=41-50, "51-60"=51-60, "60-80"=60-80, default="&amp;gt;80Docs" | stats count, avg(duration), p75(duration), p80(duration), p90(duration), p95(duration) by range
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Result of Transaction command (Important Fields: TSJobId, docCount, duration):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[2015-08-07 14:31:06,220] DEBUG Component=TSThread="DefaultMessageListenerContainer-9" TSJobId=20150807_143106_5910 MessageId= REQ_ID=94700114 StartingJob tsJobType=ingest sync=false
[2015-08-07 14:31:07,614] DEBUG Component=TSThread="DefaultMessageListenerContainer-9" TSJobId=20150807_143106_5910 MessageId= REQ_ID=94700114 Starting module=Commit docCount=7
[2015-08-07 14:31:07,614] DEBUG Component=TSThread="pool-2-thread-27" TSJobId=20150807_143106_5910 MessageId= REQ_ID=94700114 Starting module=Commit docCount=50
[2015-08-07 14:31:07,614] DEBUG Component=TSThread="pool-3-thread-20" TSJobId=20150807_143106_5910 MessageId= REQ_ID=94700114 Starting module=Commit docCount=50
[2015-08-07 14:31:31,223] DEBUG Component=TSThread="DefaultMessageListenerContainer-9" TSJobId=20150807_143106_5910 MessageId= REQ_ID=94700114 FinishedJob tsJobType=ingest duration=25004

[2015-08-07 14:26:07,646] DEBUG Component=TSThread="DefaultMessageListenerContainer-7" TSJobId=20150807_142607_5888 MessageId= REQ_ID=94696492 StartingJob tsJobType=ingest sync=false
[2015-08-07 14:26:08,349] DEBUG Component=TSThread="DefaultMessageListenerContainer-7" TSJobId=20150807_142607_5888 MessageId= REQ_ID=94696492 Starting module=Commit docCount=23
[2015-08-07 14:26:28,867] DEBUG Component=TSThread="DefaultMessageListenerContainer-7" TSJobId=20150807_142607_5808 MessageId= REQ_ID=94696492 FinishedJob tsJobType=ingest duration=11221


[2015-08-07 14:25:03,846] DEBUG Component=TSThread="DefaultMessageListenerContainer-7" TSJobId=20150807_142503_5808 MessageId= REQ_ID=94696492 StartingJob tsJobType=ingest sync=false
[2015-08-07 14:25:05,343] DEBUG Component=TSThread="DefaultMessageListenerContainer-7" TSJobId=20150807_142503_5808 MessageId= REQ_ID=94696492 Starting module=Commit docCount=3
[2015-08-07 14:25:05,343] DEBUG Component=TSThread="pool-2-thread-26" TSJobId=20150807_142503_5808 MessageId= REQ_ID=94696492 Starting module=Commit docCount=50
[2015-08-07 14:25:05,343] DEBUG Component=TSThread="pool-3-thread-11" TSJobId=20150807_142503_5808 MessageId= REQ_ID=94696492 Starting module=Commit docCount=50
[2015-08-07 14:25:28,377] DEBUG Component=TSThread="DefaultMessageListenerContainer-7" TSJobId=20150807_142503_5808 MessageId= REQ_ID=94696492 FinishedJob tsJobType=ingest duration=24532

[2015-08-07 14:23:59,434] DEBUG Component=TSThread="DefaultMessageListenerContainer-6" TSJobId=20150807_142359_5814 MessageId= REQ_ID=94695906 StartingJob tsJobType=ingest sync=false
[2015-08-07 14:24:01,094] DEBUG Component=TSThread="DefaultMessageListenerContainer-6" TSJobId=20150807_142359_5814 MessageId= REQ_ID=94695906 Starting module=Commit docCount=1
[2015-08-07 14:24:01,095] DEBUG Component=TSThread="pool-2-thread-22" TSJobId=20150807_142359_5814 MessageId= REQ_ID=94695906 Starting module=Commit docCount=50
[2015-08-07 14:24:24,164] DEBUG Component=TSThread="DefaultMessageListenerContainer-6" TSJobId=20150807_142359_5814 MessageId= REQ_ID=94695906 FinishedJob tsJobType=ingest duration=24730
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 10 Aug 2015 15:18:33 GMT</pubDate>
    <dc:creator>slatta</dc:creator>
    <dc:date>2015-08-10T15:18:33Z</dc:date>
    <item>
      <title>How to use Transaction and the sum of the same name field in a rangemap and run stats?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-Transaction-and-the-sum-of-the-same-name-field-in-a/m-p/165107#M46907</link>
      <description>&lt;P&gt;Trying to use the sum of "docCount" in a transaction and use that value for the range and then run statistics by the range. The transaction is working as expected and get the correct logs entries. If I just run the command without worrying about the sum of docCounts the count and stats work as expected, but only get a docCount max of 50. When adding the sum(docCount), the count sums, but lose the ability to run stats on the "duration" field from the log.&lt;/P&gt;

&lt;P&gt;//Range counts properly, but no stats&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ts* Component=TS ("StartingJob" OR "Starting module=Commit" OR "FinishedJob") | transaction TSJobId startswith="StartingJob" endswith="FinishedJob" keepevicted=false | stats sum(docCount) as doccounter by TSJobId|rangemap field=doccounter "0-5Docs"=0-5, "6-10Docs"=6-10, "11-20Docs"=11-20, "21-30Docs"=21-30, "31-40Docs"=31-40, "41-50Docs"=41-50, "51-60"=51-60, "60-80"=60-80, default="&amp;gt;80Docs" | stats count, avg(duration), p75(duration), p80(duration), p90(duration), p95(duration) by range
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;//Stats work, but missing the actual docCount&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ts* Component=TS ("StartingJob" OR "Starting module=Commit" OR "FinishedJob") | transaction TSJobId startswith="StartingJob" endswith="FinishedJob" keepevicted=false | rangemap field=doccounter "0-5Docs"=0-5, "6-10Docs"=6-10, "11-20Docs"=11-20, "21-30Docs"=21-30, "31-40Docs"=31-40, "41-50Docs"=41-50, "51-60"=51-60, "60-80"=60-80, default="&amp;gt;80Docs" | stats count, avg(duration), p75(duration), p80(duration), p90(duration), p95(duration) by range
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Result of Transaction command (Important Fields: TSJobId, docCount, duration):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[2015-08-07 14:31:06,220] DEBUG Component=TSThread="DefaultMessageListenerContainer-9" TSJobId=20150807_143106_5910 MessageId= REQ_ID=94700114 StartingJob tsJobType=ingest sync=false
[2015-08-07 14:31:07,614] DEBUG Component=TSThread="DefaultMessageListenerContainer-9" TSJobId=20150807_143106_5910 MessageId= REQ_ID=94700114 Starting module=Commit docCount=7
[2015-08-07 14:31:07,614] DEBUG Component=TSThread="pool-2-thread-27" TSJobId=20150807_143106_5910 MessageId= REQ_ID=94700114 Starting module=Commit docCount=50
[2015-08-07 14:31:07,614] DEBUG Component=TSThread="pool-3-thread-20" TSJobId=20150807_143106_5910 MessageId= REQ_ID=94700114 Starting module=Commit docCount=50
[2015-08-07 14:31:31,223] DEBUG Component=TSThread="DefaultMessageListenerContainer-9" TSJobId=20150807_143106_5910 MessageId= REQ_ID=94700114 FinishedJob tsJobType=ingest duration=25004

[2015-08-07 14:26:07,646] DEBUG Component=TSThread="DefaultMessageListenerContainer-7" TSJobId=20150807_142607_5888 MessageId= REQ_ID=94696492 StartingJob tsJobType=ingest sync=false
[2015-08-07 14:26:08,349] DEBUG Component=TSThread="DefaultMessageListenerContainer-7" TSJobId=20150807_142607_5888 MessageId= REQ_ID=94696492 Starting module=Commit docCount=23
[2015-08-07 14:26:28,867] DEBUG Component=TSThread="DefaultMessageListenerContainer-7" TSJobId=20150807_142607_5808 MessageId= REQ_ID=94696492 FinishedJob tsJobType=ingest duration=11221


[2015-08-07 14:25:03,846] DEBUG Component=TSThread="DefaultMessageListenerContainer-7" TSJobId=20150807_142503_5808 MessageId= REQ_ID=94696492 StartingJob tsJobType=ingest sync=false
[2015-08-07 14:25:05,343] DEBUG Component=TSThread="DefaultMessageListenerContainer-7" TSJobId=20150807_142503_5808 MessageId= REQ_ID=94696492 Starting module=Commit docCount=3
[2015-08-07 14:25:05,343] DEBUG Component=TSThread="pool-2-thread-26" TSJobId=20150807_142503_5808 MessageId= REQ_ID=94696492 Starting module=Commit docCount=50
[2015-08-07 14:25:05,343] DEBUG Component=TSThread="pool-3-thread-11" TSJobId=20150807_142503_5808 MessageId= REQ_ID=94696492 Starting module=Commit docCount=50
[2015-08-07 14:25:28,377] DEBUG Component=TSThread="DefaultMessageListenerContainer-7" TSJobId=20150807_142503_5808 MessageId= REQ_ID=94696492 FinishedJob tsJobType=ingest duration=24532

[2015-08-07 14:23:59,434] DEBUG Component=TSThread="DefaultMessageListenerContainer-6" TSJobId=20150807_142359_5814 MessageId= REQ_ID=94695906 StartingJob tsJobType=ingest sync=false
[2015-08-07 14:24:01,094] DEBUG Component=TSThread="DefaultMessageListenerContainer-6" TSJobId=20150807_142359_5814 MessageId= REQ_ID=94695906 Starting module=Commit docCount=1
[2015-08-07 14:24:01,095] DEBUG Component=TSThread="pool-2-thread-22" TSJobId=20150807_142359_5814 MessageId= REQ_ID=94695906 Starting module=Commit docCount=50
[2015-08-07 14:24:24,164] DEBUG Component=TSThread="DefaultMessageListenerContainer-6" TSJobId=20150807_142359_5814 MessageId= REQ_ID=94695906 FinishedJob tsJobType=ingest duration=24730
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Aug 2015 15:18:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-Transaction-and-the-sum-of-the-same-name-field-in-a/m-p/165107#M46907</guid>
      <dc:creator>slatta</dc:creator>
      <dc:date>2015-08-10T15:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Transaction and the sum of the same name field in a rangemap and run stats?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-Transaction-and-the-sum-of-the-same-name-field-in-a/m-p/165108#M46908</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ts* Component=TS ("StartingJob" OR "Starting module=Commit" OR "FinishedJob") | transaction TSJobId startswith="StartingJob" endswith="FinishedJob" keepevicted=false | eventstats sum(docCount) as doccounter by TSJobId| rangemap field=doccounter "0-5Docs"=0-5, "6-10Docs"=6-10, "11-20Docs"=11-20, "21-30Docs"=21-30, "31-40Docs"=31-40, "41-50Docs"=41-50, "51-60"=51-60, "60-80"=60-80, default="&amp;gt;80Docs" | stats count, avg(duration), p75(duration), p80(duration), p90(duration), p95(duration) by range
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Aug 2015 17:15:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-Transaction-and-the-sum-of-the-same-name-field-in-a/m-p/165108#M46908</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-08-10T17:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Transaction and the sum of the same name field in a rangemap and run stats?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-Transaction-and-the-sum-of-the-same-name-field-in-a/m-p/165109#M46909</link>
      <description>&lt;P&gt;In the second search, you use "doccounter" as the field for the rangemap, but the field does &lt;EM&gt;not&lt;/EM&gt; exist. So the rangemap won't work in the second search. In the first search, you calculated "doccounter" before using it. As a debugging exercise: what do you get when you run -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ts* Component=TS ("StartingJob" OR "Starting module=Commit" OR "FinishedJob") 
| transaction TSJobId startswith="StartingJob" endswith="FinishedJob" keepevicted=false 
| stats sum(docCount) as doccounter by TSJobId
| sort -doccounter
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Aug 2015 17:29:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-Transaction-and-the-sum-of-the-same-name-field-in-a/m-p/165109#M46909</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2015-08-10T17:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Transaction and the sum of the same name field in a rangemap and run stats?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-Transaction-and-the-sum-of-the-same-name-field-in-a/m-p/165110#M46910</link>
      <description>&lt;P&gt;Changing from stats sum(docCount) to eventstats sum(docCount) seems to have made the difference. Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2015 18:05:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-Transaction-and-the-sum-of-the-same-name-field-in-a/m-p/165110#M46910</guid>
      <dc:creator>slatta</dc:creator>
      <dc:date>2015-08-10T18:05:36Z</dc:date>
    </item>
  </channel>
</rss>

