<?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 find out the event with max duration? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-out-the-event-with-max-duration/m-p/283972#M85824</link>
    <description>&lt;P&gt;How to find out the event with max duration?&lt;BR /&gt;
I used command transaction to group events and I want to find out the event with max duration.&lt;/P&gt;</description>
    <pubDate>Fri, 28 Oct 2016 02:23:55 GMT</pubDate>
    <dc:creator>chhawu</dc:creator>
    <dc:date>2016-10-28T02:23:55Z</dc:date>
    <item>
      <title>How to find out the event with max duration?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-out-the-event-with-max-duration/m-p/283972#M85824</link>
      <description>&lt;P&gt;How to find out the event with max duration?&lt;BR /&gt;
I used command transaction to group events and I want to find out the event with max duration.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2016 02:23:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-out-the-event-with-max-duration/m-p/283972#M85824</guid>
      <dc:creator>chhawu</dc:creator>
      <dc:date>2016-10-28T02:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to find out the event with max duration?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-out-the-event-with-max-duration/m-p/283973#M85825</link>
      <description>&lt;P&gt;Details are unknown, but ...&lt;BR /&gt;
・・・・|transaction ・・・・|stats max(duration)&lt;BR /&gt;
OR&lt;BR /&gt;
・・・・|transaction ・・・・|sort -duration|head 1&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2016 06:35:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-out-the-event-with-max-duration/m-p/283973#M85825</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2016-10-28T06:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to find out the event with max duration?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-out-the-event-with-max-duration/m-p/283974#M85826</link>
      <description>&lt;P&gt;You are right ! I try to search with second search script to get the longest transaction,but is there any way to show column one "max(duration)" and column two _raw at once? &lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2016 14:42:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-out-the-event-with-max-duration/m-p/283974#M85826</guid>
      <dc:creator>chhawu</dc:creator>
      <dc:date>2016-10-28T14:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to find out the event with max duration?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-out-the-event-with-max-duration/m-p/283975#M85827</link>
      <description>&lt;P&gt;Instead of doing the &lt;CODE&gt;... | head 1&lt;/CODE&gt;, try instead using the &lt;CODE&gt;limit=&amp;lt;number&amp;gt;&lt;/CODE&gt; parameter of the sort.  Then to make it pretty or include other fields, use the &lt;CODE&gt;table&lt;/CODE&gt; command.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | transaction ...stuff...  |table duration, _raw  | sort limit=1 - duration 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Give that a shot and see if it works for you.&lt;/P&gt;

&lt;P&gt;Happy Splunking!&lt;BR /&gt;
Rich&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2016 15:32:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-out-the-event-with-max-duration/m-p/283975#M85827</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2016-10-28T15:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to find out the event with max duration?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-out-the-event-with-max-duration/m-p/283976#M85828</link>
      <description>&lt;P&gt;Hi Rich&lt;/P&gt;

&lt;P&gt;Thanks ! I am going to modify my search script base on your suggestion.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2016 02:48:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-out-the-event-with-max-duration/m-p/283976#M85828</guid>
      <dc:creator>chhawu</dc:creator>
      <dc:date>2016-11-01T02:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to find out the event with max duration?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-out-the-event-with-max-duration/m-p/283977#M85829</link>
      <description>&lt;P&gt;Selected answer correct for if you have one field name, for multiple similarly I use:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|sort - duration
|dedup field_name
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Mar 2018 18:25:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-out-the-event-with-max-duration/m-p/283977#M85829</guid>
      <dc:creator>akocak</dc:creator>
      <dc:date>2018-03-08T18:25:45Z</dc:date>
    </item>
  </channel>
</rss>

