<?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: Find Difference between multiple events in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Find-Difference-between-multiple-events/m-p/463094#M130550</link>
    <description>&lt;P&gt;You should be able to do that with &lt;CODE&gt;stats&lt;/CODE&gt;.  First, convert the timestamp field into epoch form so the difference can be computed.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval ts=strptime(timestamp, "%Y-%m-%d %H:%M:%S.%3N")
| stats range(ts) by TransID AppName
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 17 Dec 2019 13:12:39 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2019-12-17T13:12:39Z</dc:date>
    <item>
      <title>Find Difference between multiple events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Find-Difference-between-multiple-events/m-p/463093#M130549</link>
      <description>&lt;P&gt;TransID AppName     timestamp       Messagge&lt;BR /&gt;
1   App1    2019-12-16 18:18:43.731 +0000   Message……&lt;BR /&gt;
1   App1    2019-12-16 18:18:43.732 +0000   Before call:  1&lt;BR /&gt;
1   App2    2019-12-16 18:18:43.743 +0000   Message…..&lt;BR /&gt;
1   App2    2019-12-16 18:18:43.745 +0000   Message…..&lt;BR /&gt;
1   App1    2019-12-16 18:18:43.807 +0000   After Call: 1&lt;BR /&gt;
1   App1    2019-12-16 18:18:43.809 +0000   Message………&lt;BR /&gt;
2   App1    2019-12-16 18:22:37.720 +0000   Message……&lt;BR /&gt;
2   App1    2019-12-16 18:22:37.724 +0000   Before call:  2&lt;BR /&gt;
2   App2    2019-12-16 18:22:37.755 +0000   Message…..&lt;BR /&gt;
2   App2    2019-12-16 18:22:37.760 +0000   Message…..&lt;BR /&gt;
2   App1    2019-12-16 18:22:37.820 +0000   After Call: 2&lt;BR /&gt;
2   App1    2019-12-16 18:22:37.822 +0000   Message………&lt;/P&gt;

&lt;P&gt;I have data in above format and I want to get the output as a report which shows how much time each AppName takes to process a tarnsaction. in below format:&lt;/P&gt;

&lt;P&gt;TransID     App1        App2    ....&lt;BR /&gt;
1       0.002       0.002   ....&lt;BR /&gt;
2       0.006       0.005   ...&lt;/P&gt;

&lt;P&gt;I tried using transaction command but it gives me the duration based on the first and last event. but In my case I need how much time a transaction was in a particular app?&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2019 09:29:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Find-Difference-between-multiple-events/m-p/463093#M130549</guid>
      <dc:creator>rkmaggidi</dc:creator>
      <dc:date>2019-12-17T09:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: Find Difference between multiple events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Find-Difference-between-multiple-events/m-p/463094#M130550</link>
      <description>&lt;P&gt;You should be able to do that with &lt;CODE&gt;stats&lt;/CODE&gt;.  First, convert the timestamp field into epoch form so the difference can be computed.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval ts=strptime(timestamp, "%Y-%m-%d %H:%M:%S.%3N")
| stats range(ts) by TransID AppName
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Dec 2019 13:12:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Find-Difference-between-multiple-events/m-p/463094#M130550</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-12-17T13:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: Find Difference between multiple events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Find-Difference-between-multiple-events/m-p/463095#M130551</link>
      <description>&lt;P&gt;Thanks it worked &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2020 10:39:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Find-Difference-between-multiple-events/m-p/463095#M130551</guid>
      <dc:creator>rkmaggidi</dc:creator>
      <dc:date>2020-01-23T10:39:43Z</dc:date>
    </item>
  </channel>
</rss>

