<?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 compute time range spread over multiple files. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-compute-time-range-spread-over-multiple-files/m-p/192520#M187237</link>
    <description>&lt;P&gt;Hi Somesoni2,&lt;/P&gt;

&lt;P&gt;Thanks for your help. It solved this issue. I have 1 more query though: Now that I have the time range with me, I want to count the hits made during this time range, where the hits time is logged in another log file which does not have EmpId.&lt;/P&gt;

&lt;P&gt;I didn't mention this in initial query as i thought i would be able to achieve this once time range is found, but now I am not able to link this result with third log. Thanks for your help in advance.&lt;/P&gt;</description>
    <pubDate>Wed, 11 Jun 2014 09:12:11 GMT</pubDate>
    <dc:creator>sanjeevdixit</dc:creator>
    <dc:date>2014-06-11T09:12:11Z</dc:date>
    <item>
      <title>How to compute time range spread over multiple files.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compute-time-range-spread-over-multiple-files/m-p/192518#M187235</link>
      <description>&lt;P&gt;Hi Everyone,&lt;BR /&gt;
I want to calculate availability time range of each employee based on the records present in two files (say Start_Log and End_Log). Start_Log has start time and End_Log has the end time. The difference is the time in which employee is available. Each employee can have multiple records in both files. This means they can be available multiple times in a day.&lt;/P&gt;

&lt;P&gt;Start_Log:&lt;/P&gt;

&lt;P&gt;Event1&lt;BR /&gt;
EmpID : 1&lt;BR /&gt;
Start_Time : 09:00 AM&lt;/P&gt;

&lt;P&gt;Event2&lt;BR /&gt;
EmpID : 2&lt;BR /&gt;
Start_Time : 10:00 AM&lt;/P&gt;

&lt;P&gt;Event3&lt;BR /&gt;
EmpID : 1&lt;BR /&gt;
Start_Time : 11:00 AM&lt;/P&gt;

&lt;P&gt;End_Log:&lt;/P&gt;

&lt;P&gt;Event1&lt;BR /&gt;
EmpID : 3&lt;BR /&gt;
End_Time : 08:15 AM&lt;/P&gt;

&lt;P&gt;Event2&lt;BR /&gt;
EmpID : 1&lt;BR /&gt;
End_Time : 09:20 AM&lt;/P&gt;

&lt;P&gt;Event3&lt;BR /&gt;
EmpID : 2&lt;BR /&gt;
End_Time : 10:15 AM&lt;/P&gt;

&lt;P&gt;Event4&lt;BR /&gt;
EmpID : 1&lt;BR /&gt;
End_Time : 11:10 AM&lt;/P&gt;

&lt;P&gt;Expected result:&lt;/P&gt;

&lt;P&gt;EmpID : 1&lt;BR /&gt;
Availability_time : 09:00 AM - 09:20 AM&lt;/P&gt;

&lt;P&gt;Event2&lt;BR /&gt;
EmpID : 2&lt;BR /&gt;
Availability_time : 10:00 AM - 10:15 AM&lt;/P&gt;

&lt;P&gt;Event3&lt;BR /&gt;
EmpID : 1&lt;BR /&gt;
Availability_time : 11:00 AM - 11:10 AM&lt;/P&gt;

&lt;P&gt;How can I achieve this? Is there any way to loop through the records of files?&lt;BR /&gt;
Thanks for help in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:49:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compute-time-range-spread-over-multiple-files/m-p/192518#M187235</guid>
      <dc:creator>sanjeevdixit</dc:creator>
      <dc:date>2020-09-28T16:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute time range spread over multiple files.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compute-time-range-spread-over-multiple-files/m-p/192519#M187236</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=Start_Log OR source=End_Log | transaction EmpID maxevents=2 startswith=source=Start_Log endswith=source=End_Log | eval Availability_time=Start_Time." - ".EndTime| table EmpID, Availability_time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Jun 2014 13:01:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compute-time-range-spread-over-multiple-files/m-p/192519#M187236</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-06-09T13:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute time range spread over multiple files.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compute-time-range-spread-over-multiple-files/m-p/192520#M187237</link>
      <description>&lt;P&gt;Hi Somesoni2,&lt;/P&gt;

&lt;P&gt;Thanks for your help. It solved this issue. I have 1 more query though: Now that I have the time range with me, I want to count the hits made during this time range, where the hits time is logged in another log file which does not have EmpId.&lt;/P&gt;

&lt;P&gt;I didn't mention this in initial query as i thought i would be able to achieve this once time range is found, but now I am not able to link this result with third log. Thanks for your help in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jun 2014 09:12:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compute-time-range-spread-over-multiple-files/m-p/192520#M187237</guid>
      <dc:creator>sanjeevdixit</dc:creator>
      <dc:date>2014-06-11T09:12:11Z</dc:date>
    </item>
  </channel>
</rss>

