<?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: Transactions based on distinct values of extracted field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Transactions-based-on-distinct-values-of-extracted-field/m-p/295105#M89065</link>
    <description>&lt;P&gt;Try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;some_id | transaction session_id startswith="Session closed" endswith="Session opened" maxpause=30m 
| stats count as connection_breaks by session_id
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 16 May 2017 18:22:25 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2017-05-16T18:22:25Z</dc:date>
    <item>
      <title>Transactions based on distinct values of extracted field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transactions-based-on-distinct-values-of-extracted-field/m-p/295104#M89064</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm trying to create transactions from events like this:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;Session opened: [some id]&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;Session closed: [some id]&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;For a single id I can just use a search like this:&lt;BR /&gt;&lt;BR /&gt;
&lt;CODE&gt;some_id | transaction startswith="Session closed" endswith="Session opened" maxpause=30m&lt;/CODE&gt;&lt;BR /&gt;
to find sessions that had a break of at most 30 minutes.&lt;/P&gt;

&lt;P&gt;The  &lt;CODE&gt;session_id&lt;/CODE&gt; I'm searching with is an extracted field. How would I go about finding the count of these transactions (closed -&amp;gt; opened) per  &lt;CODE&gt;session_id&lt;/CODE&gt;?&lt;/P&gt;

&lt;P&gt;This is what I would like to get out:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;session           connection_breaks
-----------------------------------
session1          1
session2          5
session3          2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 May 2017 09:07:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transactions-based-on-distinct-values-of-extracted-field/m-p/295104#M89064</guid>
      <dc:creator>mjuopperi_elisa</dc:creator>
      <dc:date>2017-05-16T09:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: Transactions based on distinct values of extracted field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transactions-based-on-distinct-values-of-extracted-field/m-p/295105#M89065</link>
      <description>&lt;P&gt;Try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;some_id | transaction session_id startswith="Session closed" endswith="Session opened" maxpause=30m 
| stats count as connection_breaks by session_id
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 May 2017 18:22:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transactions-based-on-distinct-values-of-extracted-field/m-p/295105#M89065</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-05-16T18:22:25Z</dc:date>
    </item>
  </channel>
</rss>

