<?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 edit my transaction search so that it will only return grouped results? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-transaction-search-so-that-it-will-only-return/m-p/308919#M92652</link>
    <description>&lt;P&gt;&lt;CODE&gt;range(_time) as duration&lt;/CODE&gt; would also work instead of max/min and an eval.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats count as eventcount min(_time) as _time range(_time) as duration by field
 | search eventcount&amp;gt;1
 | table _time field eventcount duration
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 03 Apr 2017 17:05:46 GMT</pubDate>
    <dc:creator>cmerriman</dc:creator>
    <dc:date>2017-04-03T17:05:46Z</dc:date>
    <item>
      <title>How to edit my transaction search so that it will only return grouped results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-transaction-search-so-that-it-will-only-return/m-p/308917#M92650</link>
      <description>&lt;P&gt;This seems like it would be easy to figure out through search but I'm coming across a dead end.&lt;BR /&gt;
I have a transaction and I want to ONLY return the grouped results, not the ones that don't find a match as well.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;xyz0024 OR xyz0019 fooxyz source="/company-logs/abc/current/abc.log" NOT (type=pa) | transaction field1 maxpause=3s 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2017 16:08:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-transaction-search-so-that-it-will-only-return/m-p/308917#M92650</guid>
      <dc:creator>EricLloyd79</dc:creator>
      <dc:date>2017-04-03T16:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my transaction search so that it will only return grouped results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-transaction-search-so-that-it-will-only-return/m-p/308918#M92651</link>
      <description>&lt;P&gt;Transaction created eventcount field with events that match the transaction criteria. You can use the same to filter results you need.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | transaction field1 maxpause=3s
 | search eventcount&amp;gt;1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, for a scenario like this you should be using stats instead. If you can add more details around data/fields you are interested in may be the community can suggest you with better query with stats. It would go like the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats count as eventcount min(_time) as MinTime max(_time) as MaxTime by field
| search eventcount&amp;gt;1
| eval duration=MaxTime-MinTime
| eval _time=MinTime
| table _time field eventcount duration
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You should also accomodate any other field of interest in stats command above using aggregate function like values() list() etc.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2017 16:47:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-transaction-search-so-that-it-will-only-return/m-p/308918#M92651</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-04-03T16:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my transaction search so that it will only return grouped results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-transaction-search-so-that-it-will-only-return/m-p/308919#M92652</link>
      <description>&lt;P&gt;&lt;CODE&gt;range(_time) as duration&lt;/CODE&gt; would also work instead of max/min and an eval.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats count as eventcount min(_time) as _time range(_time) as duration by field
 | search eventcount&amp;gt;1
 | table _time field eventcount duration
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 03 Apr 2017 17:05:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-transaction-search-so-that-it-will-only-return/m-p/308919#M92652</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2017-04-03T17:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my transaction search so that it will only return grouped results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-transaction-search-so-that-it-will-only-return/m-p/308920#M92653</link>
      <description>&lt;P&gt;That's the default behavior for &lt;CODE&gt;transaction&lt;/CODE&gt; (defaults to &lt;CODE&gt;keeporphans=false&lt;/CODE&gt;).&lt;/P&gt;

&lt;P&gt;...which leads me to believe that your problem statement is missing some background information that we need to know in order to help you.&lt;/P&gt;

&lt;P&gt;niketnilay and cmerriman have given you some suggestions.  If neither of those work for you, then please give us more information about what behavior you need, and what the characteristics of the events are that you are trying to group.  Preferably with some non-confidential example data. &lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2017 17:14:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-transaction-search-so-that-it-will-only-return/m-p/308920#M92653</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-04-03T17:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my transaction search so that it will only return grouped results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-transaction-search-so-that-it-will-only-return/m-p/308921#M92654</link>
      <description>&lt;P&gt;Thanks this worked, niketnailay.&lt;BR /&gt;
Please add it as an official answer to the question so I can mark it correct and give you points and offer notification to others that this answer worked for me.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2017 12:46:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-transaction-search-so-that-it-will-only-return/m-p/308921#M92654</guid>
      <dc:creator>EricLloyd79</dc:creator>
      <dc:date>2017-04-04T12:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my transaction search so that it will only return grouped results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-transaction-search-so-that-it-will-only-return/m-p/308922#M92655</link>
      <description>&lt;P&gt;Moved it to an answer for you.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2017 17:33:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-transaction-search-so-that-it-will-only-return/m-p/308922#M92655</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-04-04T17:33:07Z</dc:date>
    </item>
  </channel>
</rss>

