<?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: Time/date extraction from our log in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Time-date-extraction-from-our-log/m-p/28379#M5615</link>
    <description>&lt;P&gt;I'm not sure Splunk can deal with both microseconds and milliseconds.&lt;/P&gt;</description>
    <pubDate>Mon, 05 Dec 2011 22:32:37 GMT</pubDate>
    <dc:creator>dwaddle</dc:creator>
    <dc:date>2011-12-05T22:32:37Z</dc:date>
    <item>
      <title>Time/date extraction from our log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Time-date-extraction-from-our-log/m-p/28376#M5612</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;
Im really struggling to extract the time/date data from our logs. Ive read some of the other topics/docs on doing this, but just can't seem to get it to work. The auto extract field discovery also doesnt work;&lt;/P&gt;

&lt;P&gt;or log data looks like;&lt;BR /&gt;
    4972   ClientApp   5108  0   10   Client-10  18/11/2011 23:57:02:19+20 Scheduler2    No tick violation in last period of '00:00:10:00'.&lt;/P&gt;

&lt;P&gt;so the time date of this specific log message would be "18/11/2011 23:57:02:19+20" where the +20 denotes the number of microseconds through the millisecond. ie; "dd/mm/yyyy hh:mm:ss:ms+us"&lt;/P&gt;

&lt;P&gt;Anyone know how to regex this so that splunk can index it properly?&lt;/P&gt;

&lt;P&gt;cheers&lt;BR /&gt;
p&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2011 10:53:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Time-date-extraction-from-our-log/m-p/28376#M5612</guid>
      <dc:creator>peterbrown05</dc:creator>
      <dc:date>2011-12-05T10:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: Time/date extraction from our log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Time-date-extraction-from-our-log/m-p/28377#M5613</link>
      <description>&lt;P&gt;How is it not working? Time is completely wrong, or almost correct but not catching the milli/microseconds?&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2011 12:29:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Time-date-extraction-from-our-log/m-p/28377#M5613</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2011-12-05T12:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: Time/date extraction from our log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Time-date-extraction-from-our-log/m-p/28378#M5614</link>
      <description>&lt;P&gt;I love precision just as much as the next guy, but do you NEED the microseconds? Or would you be happy enough with the milliseconds? Or seconds?&lt;/P&gt;

&lt;P&gt;If I understand your time format correctly, it really says 23:57:02:019020&lt;BR /&gt;&lt;BR /&gt;
That's 19 milliseconds and another 20 microseconds. So there are no leading zeros in your timestamp format, for either ms or us, right?&lt;/P&gt;

&lt;P&gt;If that is the case, I'd either&lt;/P&gt;

&lt;P&gt;a) be happy with SECONDS. Skip everything after %H:%M:%S in your TIME_FORMAT&lt;BR /&gt;
   or&lt;BR /&gt;
b) change the log format at the source. Leading zeros... you gotta have those.&lt;/P&gt;

&lt;P&gt;UPDATE:&lt;/P&gt;

&lt;P&gt;If you do not really need the events to be indexed at the correct millisecond, there is no need to try to fix any conversion at all (i.e. frame_no * 40 = ms). If I understood you correctly, you want to have the frame number as part of the timestamp, correct? &lt;/P&gt;

&lt;P&gt;Would it then be possible to pretend that the frame number is actually the fraction of a second? Ending the TIME_FORMAT= with ...&lt;CODE&gt;%M:%S:%2N+&lt;/CODE&gt; lets Splunk believe that the frame number value is in hundredths of a second.&lt;/P&gt;

&lt;P&gt;Looking at the events, especially in a timeline format, would obviously be wrong, since no events would ever come in between .25 and .99 of any given second - but you'd know this. Precision would still be pretty good for most intents and purposes, and you'd be indexing events on year-month-day-hour-minute-second-frame.&lt;/P&gt;

&lt;P&gt;UPDATE2: &lt;/P&gt;

&lt;P&gt;The 'solution' suggested above require that frames are written with leading zeros, i.e. the first frame is logged as '01' and not '1'. If not, there will be no distinction between frames 1 and 10, and frames 2 and 20. The rest should be fine. Forgot to mention that in my previous post. Sorry.&lt;/P&gt;

&lt;P&gt;Maybe this approach is too much of cutting corners, but please let us know what you think.&lt;/P&gt;

&lt;P&gt;hth,&lt;/P&gt;

&lt;P&gt;Kristian&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2011 20:00:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Time-date-extraction-from-our-log/m-p/28378#M5614</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2011-12-05T20:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: Time/date extraction from our log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Time-date-extraction-from-our-log/m-p/28379#M5615</link>
      <description>&lt;P&gt;I'm not sure Splunk can deal with both microseconds and milliseconds.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2011 22:32:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Time-date-extraction-from-our-log/m-p/28379#M5615</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2011-12-05T22:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: Time/date extraction from our log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Time-date-extraction-from-our-log/m-p/28380#M5616</link>
      <description>&lt;P&gt;sorry, maybe i over simplified my original question. the ms are actually "frames" as we work in broadcast. so a frame (in PAL regions) is 40ms. (0 to 24frames in a second) so thats actually 19x40ms. To us the frames are important but we could ignore anything after the +.&lt;/P&gt;

&lt;P&gt;We wouldnt want to convert the frames to milliseconds, more just that it should log on a specific frame in the example above on frame 19.&lt;/P&gt;

&lt;P&gt;sorry for causing confusion,&lt;BR /&gt;
peteB&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2011 08:02:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Time-date-extraction-from-our-log/m-p/28380#M5616</guid>
      <dc:creator>peterbrown05</dc:creator>
      <dc:date>2011-12-06T08:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: Time/date extraction from our log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Time-date-extraction-from-our-log/m-p/28381#M5617</link>
      <description>&lt;P&gt;OK, thanks for the clarification. So - what works and what does not work?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2011 08:41:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Time-date-extraction-from-our-log/m-p/28381#M5617</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2011-12-06T08:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: Time/date extraction from our log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Time-date-extraction-from-our-log/m-p/28382#M5618</link>
      <description>&lt;P&gt;see update above.&lt;/P&gt;

&lt;P&gt;/k&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2011 21:50:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Time-date-extraction-from-our-log/m-p/28382#M5618</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2011-12-06T21:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: Time/date extraction from our log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Time-date-extraction-from-our-log/m-p/28383#M5619</link>
      <description>&lt;P&gt;yeah; I think this is along the right lines. however, its not possible for us to change the log format as our software is installed on many customer sites which means it is impossible for us to upgrade across the board. &lt;/P&gt;

&lt;P&gt;We are evaluating splunk to help us mine the data that is already being generated. Perhaps then there is a way (using some regex magic?) to index the data using Frames x 40ms, but then just displaying the "field" as the hh:mm:ss+XX.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2011 09:21:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Time-date-extraction-from-our-log/m-p/28383#M5619</guid>
      <dc:creator>peterbrown05</dc:creator>
      <dc:date>2011-12-07T09:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Time/date extraction from our log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Time-date-extraction-from-our-log/m-p/28384#M5620</link>
      <description>&lt;P&gt;It certainly is useful for us to be able to see "what happened" at a specific frame; eg, video should start playing, router switches program to output, channel logo is displayed etc - all of which may be logged out on different systems into different log files; but all machines are synchronised to the same "house" time.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2011 09:21:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Time-date-extraction-from-our-log/m-p/28384#M5620</guid>
      <dc:creator>peterbrown05</dc:creator>
      <dc:date>2011-12-07T09:21:59Z</dc:date>
    </item>
  </channel>
</rss>

