<?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 Report on timestamps for two different Eventtypes in the same search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Report-on-timestamps-for-two-different-Eventtypes-in-the-same/m-p/143546#M39887</link>
    <description>&lt;P&gt;I have two successful searches that I want to combine into one. Ideally, I'm trying to see for each segmentNo, what the process start time and process end time is, as well as duration. Both of the times are to be extracted from the timestamps for those events.&lt;/P&gt;

&lt;P&gt;With the two searches below, I can create two independent tables which give me information on three columns: segmentNo, host and (start/end)time. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eventtype="processingstart" devID="XA123" segmentNo="*" |eval startTime=strftime(_time,"%Y-%m-%d %H:%M:%S")| dedup segmentNo |table host segmentNo startTime
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;AND&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eventtype="processingend" devID="XA123" segmentNo="*" |eval endTime=strftime(_time,"%Y-%m-%d %H:%M:%S")| dedup segmentNo |table host segmentNo endTime
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried using append and join (w/ combinations of search AND search NOT) but they would not let me search by eventtype. I basically want Splunk to understand that the startTime comes from the timestamp of eventtype1 and endTime comes from the timestamp of eventtype 2. If I take a long approach, I can export tables from both these searches independently and combine them in Excel or something. But I'm looking for one single table from Splunk that will report a table on these fields: segmentNo, host, startTime, endTime, duration&lt;/P&gt;

&lt;P&gt;Any help would be appreciated &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Feb 2015 22:38:50 GMT</pubDate>
    <dc:creator>aramakrishnan</dc:creator>
    <dc:date>2015-02-12T22:38:50Z</dc:date>
    <item>
      <title>Report on timestamps for two different Eventtypes in the same search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Report-on-timestamps-for-two-different-Eventtypes-in-the-same/m-p/143546#M39887</link>
      <description>&lt;P&gt;I have two successful searches that I want to combine into one. Ideally, I'm trying to see for each segmentNo, what the process start time and process end time is, as well as duration. Both of the times are to be extracted from the timestamps for those events.&lt;/P&gt;

&lt;P&gt;With the two searches below, I can create two independent tables which give me information on three columns: segmentNo, host and (start/end)time. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eventtype="processingstart" devID="XA123" segmentNo="*" |eval startTime=strftime(_time,"%Y-%m-%d %H:%M:%S")| dedup segmentNo |table host segmentNo startTime
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;AND&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eventtype="processingend" devID="XA123" segmentNo="*" |eval endTime=strftime(_time,"%Y-%m-%d %H:%M:%S")| dedup segmentNo |table host segmentNo endTime
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried using append and join (w/ combinations of search AND search NOT) but they would not let me search by eventtype. I basically want Splunk to understand that the startTime comes from the timestamp of eventtype1 and endTime comes from the timestamp of eventtype 2. If I take a long approach, I can export tables from both these searches independently and combine them in Excel or something. But I'm looking for one single table from Splunk that will report a table on these fields: segmentNo, host, startTime, endTime, duration&lt;/P&gt;

&lt;P&gt;Any help would be appreciated &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Feb 2015 22:38:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Report-on-timestamps-for-two-different-Eventtypes-in-the-same/m-p/143546#M39887</guid>
      <dc:creator>aramakrishnan</dc:creator>
      <dc:date>2015-02-12T22:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: Report on timestamps for two different Eventtypes in the same search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Report-on-timestamps-for-two-different-Eventtypes-in-the-same/m-p/143547#M39888</link>
      <description>&lt;P&gt;Have you tried &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Join"&gt;Join&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; eventtype="processingstart" devID="XA123" segmentNo="*" |eval startTime=strftime(_time,"%Y-%m-%d %H:%M:%S")| dedup segmentNo |table host segmentNo startTime| join segmentNo [search eventtype="processingend" devID="XA123" segmentNo="*" |eval endTime=strftime(_time,"%Y-%m-%d %H:%M:%S")| dedup segmentNo |table host segmentNo endTime]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;should give you the  result you are looking for.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Feb 2015 01:08:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Report-on-timestamps-for-two-different-Eventtypes-in-the-same/m-p/143547#M39888</guid>
      <dc:creator>ramdaspr</dc:creator>
      <dc:date>2015-02-13T01:08:38Z</dc:date>
    </item>
  </channel>
</rss>

