<?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 Duration by messageid and in seconds in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Duration-by-messageid-and-in-seconds/m-p/425188#M191079</link>
    <description>&lt;P&gt;In a earlier question I asked a question about an eval, this was luckily solved by Mus. Now I wonder how i can present the results in one line per ID&lt;BR /&gt;
This is my search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;my search&amp;gt;  
| eval Start=if('message.information'=="Start",_time,null()) 
| eval End =if('message.information'=="End",_time,null()) |eval dur= Start-End
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What I am searching for is how to get one line per ID , this is unique for all the events I want the duration for.&lt;/P&gt;</description>
    <pubDate>Fri, 02 Aug 2019 08:19:34 GMT</pubDate>
    <dc:creator>Mike6960</dc:creator>
    <dc:date>2019-08-02T08:19:34Z</dc:date>
    <item>
      <title>Duration by messageid and in seconds</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Duration-by-messageid-and-in-seconds/m-p/425188#M191079</link>
      <description>&lt;P&gt;In a earlier question I asked a question about an eval, this was luckily solved by Mus. Now I wonder how i can present the results in one line per ID&lt;BR /&gt;
This is my search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;my search&amp;gt;  
| eval Start=if('message.information'=="Start",_time,null()) 
| eval End =if('message.information'=="End",_time,null()) |eval dur= Start-End
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What I am searching for is how to get one line per ID , this is unique for all the events I want the duration for.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 08:19:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Duration-by-messageid-and-in-seconds/m-p/425188#M191079</guid>
      <dc:creator>Mike6960</dc:creator>
      <dc:date>2019-08-02T08:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: Duration by messageid and in seconds</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Duration-by-messageid-and-in-seconds/m-p/425189#M191080</link>
      <description>&lt;P&gt;@Mike6960 ,&lt;/P&gt;

&lt;P&gt;Try &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your search |stats latest(eval(if('message.information'=="Start",_time,null()))) as Start, latest(eval(if('message.information'=="End",_time,null()))) as End by ID |eval dur=Start-End
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You may use &lt;CODE&gt;first&lt;/CODE&gt; as well instead of latest&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 09:34:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Duration-by-messageid-and-in-seconds/m-p/425189#M191080</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-08-02T09:34:09Z</dc:date>
    </item>
  </channel>
</rss>

