<?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: Collecting _time from a different event in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Collecting-time-from-a-different-event/m-p/533884#M150877</link>
    <description>&lt;P&gt;This works for when looking at one specific record. What I am looking for is to record the _time when a work order reaches at specific count number. I would like to record the _time when a WO hits count=6, count= 12, count = 18.... etc to record when&amp;nbsp; the work order hits certain spots on the count. The problem is my dataset records them just when they begin the work order.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So ideally, I'd have the time at specific count numbers, but the only way I can tell when that time would be is by when the most recent one starts.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Dec 2020 20:26:29 GMT</pubDate>
    <dc:creator>strehb18</dc:creator>
    <dc:date>2020-12-22T20:26:29Z</dc:date>
    <item>
      <title>Collecting _time from a different event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Collecting-time-from-a-different-event/m-p/533776#M150841</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am hoping this is easy and I am blanking. I have a data source the logs what work order is in station one. I am looking to get an offline_time based on when a work order reaches a certain station.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Ex&amp;nbsp;&lt;BR /&gt;_time&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WO&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;count&lt;/P&gt;&lt;P&gt;11:45&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1231&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/P&gt;&lt;P&gt;11:40&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1232&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&amp;nbsp;&lt;/P&gt;&lt;P&gt;11:35&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1233&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&amp;nbsp;&lt;BR /&gt;11:30&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1234&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4 ..... etc&lt;/P&gt;&lt;P&gt;So the _time is when the work starts and when count reaches a certain number, the work order would be done on the line(count would equal 35 in my case) . I would like to collect the _time of what is in count=1 when the count reaches 35.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 21:07:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Collecting-time-from-a-different-event/m-p/533776#M150841</guid>
      <dc:creator>strehb18</dc:creator>
      <dc:date>2020-12-21T21:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: Collecting _time from a different event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Collecting-time-from-a-different-event/m-p/533784#M150844</link>
      <description>&lt;P&gt;you may use stats/eventstats with eval&lt;/P&gt;&lt;P&gt;Please try this run anywhere example. It injects the time of first event in every event. Let's know what's your final expected result&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|makeresults count=35|streamstats count
|eval _time=_time+count*5|eval wo="order_".count
|eventstats first(eval(if(count==1,_time,null()))) as starting_time&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2020 02:17:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Collecting-time-from-a-different-event/m-p/533784#M150844</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2020-12-22T02:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: Collecting _time from a different event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Collecting-time-from-a-different-event/m-p/533884#M150877</link>
      <description>&lt;P&gt;This works for when looking at one specific record. What I am looking for is to record the _time when a work order reaches at specific count number. I would like to record the _time when a WO hits count=6, count= 12, count = 18.... etc to record when&amp;nbsp; the work order hits certain spots on the count. The problem is my dataset records them just when they begin the work order.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So ideally, I'd have the time at specific count numbers, but the only way I can tell when that time would be is by when the most recent one starts.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2020 20:26:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Collecting-time-from-a-different-event/m-p/533884#M150877</guid>
      <dc:creator>strehb18</dc:creator>
      <dc:date>2020-12-22T20:26:29Z</dc:date>
    </item>
    <item>
      <title>Re: Collecting _time from a different event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Collecting-time-from-a-different-event/m-p/533909#M150883</link>
      <description>&lt;P&gt;Ok, how do you know that the WO hits that count? Or is that defined? Using the previous dummy search, could you please point out the values manually and the steps to decide the count number?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 23 Dec 2020 03:20:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Collecting-time-from-a-different-event/m-p/533909#M150883</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2020-12-23T03:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: Collecting _time from a different event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Collecting-time-from-a-different-event/m-p/533964#M150902</link>
      <description>&lt;P&gt;So I guess that is what my problem is. After the next event is added, the count changes. I could make it static but then wouldn't be able to tell when events are at certain spots. So I was wondering how to log a time when each event reaches the count of a certain number.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So something like, looking at two different scenarios where we collect the _time when a count reaches 3.&amp;nbsp;&lt;/P&gt;&lt;P&gt;_time&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WO&amp;nbsp; &amp;nbsp; &amp;nbsp;Count&amp;nbsp; &amp;nbsp; time_to_log&lt;BR /&gt;9:15&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1234&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;9:00&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1233&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&amp;nbsp;&lt;/P&gt;&lt;P&gt;8:45&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1232&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 9:15&lt;/P&gt;&lt;P&gt;8:30&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1231&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 9:00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Next Event comes&lt;/P&gt;&lt;P&gt;_time&amp;nbsp; &amp;nbsp; &amp;nbsp; WO&amp;nbsp; &amp;nbsp; &amp;nbsp; Count&amp;nbsp; &amp;nbsp; &amp;nbsp; time_to_log&lt;/P&gt;&lt;P&gt;9:30&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1235&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;9:15&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1234&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp;&lt;/P&gt;&lt;P&gt;9:00&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1233&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 9:30&lt;/P&gt;&lt;P&gt;8:45&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1232&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 9:15&lt;/P&gt;&lt;P&gt;8:30&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1231&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 9:00&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Dec 2020 15:21:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Collecting-time-from-a-different-event/m-p/533964#M150902</guid>
      <dc:creator>strehb18</dc:creator>
      <dc:date>2020-12-23T15:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: Collecting _time from a different event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Collecting-time-from-a-different-event/m-p/534164#M150967</link>
      <description>&lt;P&gt;Ok, if you know the counter, 3 in our case, you may try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|makeresults count=5|streamstats count as _int
|eval _time=_time+_int*600|eval wo="order_"._int
|reverse
|streamstats count
|rename COMMENT as "Created dummy events above and set the counter below" 
|eval COUNTER=3
|eventstats values(_time) as _time_list
|eval my_time=mvindex(_time_list,-(count-(COUNTER-1)))
|convert ctime(my_time) as my_time
|eval my_time=if(count &amp;lt; COUNTER,null(),my_time)&lt;/LI-CODE&gt;&lt;P&gt;You can play around by changing count=5 to another values and also the COUNTER=3 to other values&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Dec 2020 03:46:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Collecting-time-from-a-different-event/m-p/534164#M150967</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2020-12-28T03:46:14Z</dc:date>
    </item>
  </channel>
</rss>

