<?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: Search, top, count inside a transaction in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-top-count-inside-a-transaction/m-p/104140#M26946</link>
    <description>&lt;P&gt;Hi emaccaferri, is there any reason you must use multi value? Would a table result be ok:&lt;BR /&gt;
23/07/2013 17:09 userdi1 value1 3&lt;BR /&gt;
23/07/2013 17:09 userdi1 value2 2&lt;BR /&gt;
...&lt;/P&gt;</description>
    <pubDate>Tue, 23 Jul 2013 17:36:27 GMT</pubDate>
    <dc:creator>gregbujak</dc:creator>
    <dc:date>2013-07-23T17:36:27Z</dc:date>
    <item>
      <title>Search, top, count inside a transaction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-top-count-inside-a-transaction/m-p/104139#M26945</link>
      <description>&lt;P&gt;Hi!&lt;BR /&gt;
I would like to know the frequency of each value of a certain field inside a transaction, for example:&lt;BR /&gt;
my event after transaction (mvlist=t) are&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;23/07/2013 17:09 userdi1 value1
                 userid1 value2
                 userid1 value1
                 userid1 value3
                 userid1 value2
                 userid1 value1



23/07/2013 14:09 userid2 value2
                     userid2 value2
                     userid2 value2
                     userid2 value3
                     userid2 value2
                     userid2 value3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I wish to get the result:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;23/07/2013 17:09 userdi1 value1 3
                         value2 2
                         value3 1

23/07/2013 14:09 userid2 value2 4
                         value3 2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I think to need transaction because in my log I have more than one "event" (section) for the same user.&lt;BR /&gt;
This search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=ing sourcetype=callcenter | transaction maxpause=30m cif mvlist=t | stats count(value) by value 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;doesn't work.&lt;BR /&gt;
My impression is that top or something similar inside a transaction without breakink it it impossible.&lt;BR /&gt;
Any suggestion?&lt;BR /&gt;
Thanks for your time&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2013 15:29:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-top-count-inside-a-transaction/m-p/104139#M26945</guid>
      <dc:creator>emaccaferri</dc:creator>
      <dc:date>2013-07-23T15:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: Search, top, count inside a transaction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-top-count-inside-a-transaction/m-p/104140#M26946</link>
      <description>&lt;P&gt;Hi emaccaferri, is there any reason you must use multi value? Would a table result be ok:&lt;BR /&gt;
23/07/2013 17:09 userdi1 value1 3&lt;BR /&gt;
23/07/2013 17:09 userdi1 value2 2&lt;BR /&gt;
...&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2013 17:36:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-top-count-inside-a-transaction/m-p/104140#M26946</guid>
      <dc:creator>gregbujak</dc:creator>
      <dc:date>2013-07-23T17:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: Search, top, count inside a transaction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-top-count-inside-a-transaction/m-p/104141#M26947</link>
      <description>&lt;P&gt;Since the &lt;CODE&gt;transaction&lt;/CODE&gt; command groups events based on the common identifier and then basically creates a new event containing all of the transaction's events, you can do your counts based on _time (as each transaction will have a unique _time) value.&lt;/P&gt;

&lt;P&gt;In your example you could do as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ing sourcetype=callcenter | transaction maxpause=30m cif | stats count(value) by _time, cif, value
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Which would give you a results set similar to this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;23/07/2013 17:09 userid1 value1 3
23/07/2013 17:09 userid1 value2 2
23/07/2013 17:09 userid1 value3 1

23/07/2013 14:09 userid2 value2 4
23/07/2013 14:09 userid2 value3 2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Each unique value of _time indicates the counts for a single transaction.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2013 17:43:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-top-count-inside-a-transaction/m-p/104141#M26947</guid>
      <dc:creator>ftk</dc:creator>
      <dc:date>2013-07-23T17:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: Search, top, count inside a transaction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-top-count-inside-a-transaction/m-p/104142#M26948</link>
      <description>&lt;P&gt;Can be in this way, the important thing is count number of event with that value&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2013 07:24:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-top-count-inside-a-transaction/m-p/104142#M26948</guid>
      <dc:creator>emaccaferri</dc:creator>
      <dc:date>2013-07-24T07:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: Search, top, count inside a transaction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-top-count-inside-a-transaction/m-p/104143#M26949</link>
      <description>&lt;P&gt;This doesn't work either. The result become like&lt;BR /&gt;
23/07/2013 17:09 userid1 value1 6&lt;BR /&gt;
23/07/2013 17:09 userid1 value2 6&lt;BR /&gt;
23/07/2013 17:09 userid1 value3 6&lt;/P&gt;

&lt;P&gt;so each value counted like the total number of event for that userid,_time&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2013 07:42:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-top-count-inside-a-transaction/m-p/104143#M26949</guid>
      <dc:creator>emaccaferri</dc:creator>
      <dc:date>2013-07-24T07:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: Search, top, count inside a transaction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-top-count-inside-a-transaction/m-p/104144#M26950</link>
      <description>&lt;P&gt;In my answer I assumed that "value" is an extracted field. Is this correct? If it is an extracted field then the search I gave you aggregates the counts fine (I tested it on sample data).&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2013 13:07:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-top-count-inside-a-transaction/m-p/104144#M26950</guid>
      <dc:creator>ftk</dc:creator>
      <dc:date>2013-07-24T13:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: Search, top, count inside a transaction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-top-count-inside-a-transaction/m-p/104145#M26951</link>
      <description>&lt;P&gt;Yes, that field is extacted at search-time. But I don't understand, how is it possible that for you is working and not for me? I made copy&amp;amp;paste&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2013 15:37:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-top-count-inside-a-transaction/m-p/104145#M26951</guid>
      <dc:creator>emaccaferri</dc:creator>
      <dc:date>2013-07-24T15:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: Search, top, count inside a transaction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-top-count-inside-a-transaction/m-p/104146#M26952</link>
      <description>&lt;P&gt;Do you mind posting a single sample event (before using transaction)? Maybe I am assuming something in my test data that is not present.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2013 15:42:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-top-count-inside-a-transaction/m-p/104146#M26952</guid>
      <dc:creator>ftk</dc:creator>
      <dc:date>2013-07-24T15:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: Search, top, count inside a transaction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-top-count-inside-a-transaction/m-p/104147#M26953</link>
      <description>&lt;P&gt;1003411 27/05/2013  10:40 value1&lt;BR /&gt;
1003411 27/05/2013  10:41 value1&lt;BR /&gt;
1003411 27/05/2013  10:43 value2&lt;BR /&gt;
1008980 27/05/2013  12:21 value1&lt;BR /&gt;&lt;BR /&gt;
1008980 27/05/2013  12:21 value2&lt;BR /&gt;&lt;BR /&gt;
1008980 27/05/2013  12:21 value3&lt;BR /&gt;&lt;BR /&gt;
1008980 27/05/2013  12:21 value2&lt;BR /&gt;&lt;BR /&gt;
1008980 27/05/2013  12:23 value3&lt;BR /&gt;
1008980 27/05/2013  12:23 value3&lt;/P&gt;

&lt;P&gt;and so on&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2013 07:12:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-top-count-inside-a-transaction/m-p/104147#M26953</guid>
      <dc:creator>emaccaferri</dc:creator>
      <dc:date>2013-07-26T07:12:22Z</dc:date>
    </item>
  </channel>
</rss>

