<?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 timeformat are not getting extracted properly in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/timeformat-are-not-getting-extracted-properly/m-p/406308#M72098</link>
    <description>&lt;P&gt;timeformat are not getting extracted properly, we have one type of timestamp but clock there is different. It is starting from 0 - 24 hours and date starting from 1- 31, and also same for month 1- 12, see timestamp example below.&lt;/P&gt;

&lt;P&gt;[8/10/18 0:20:37:469 EDT]&lt;BR /&gt;
[8/9/18 11:59:59:796 EDT]&lt;BR /&gt;
[8/9/18 13:16:38:194 EDT]&lt;BR /&gt;
[8/12/18 1:49:08:943 EDT]&lt;BR /&gt;
[8/11/18 22:59:45:370 EDT]&lt;/P&gt;

&lt;P&gt;I tried to use this props.conf but didn't work &lt;/P&gt;

&lt;P&gt;[sourcetypename]&lt;BR /&gt;
BREAK_ONLY_BEFORE = [\d+\/\d+\/\d+\s\d+[:]\d+[:]\d+[:]\d+\s\w{3}]&lt;BR /&gt;
TIME_FORMAT = %m/%e/%y %k:%M:%S:%3N &lt;/P&gt;

&lt;P&gt;After this I tried to extract using datetime.xml, that is working for some extent but not fully. Using that I am getting delay in indexed event timestamp, please help...&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 20:54:07 GMT</pubDate>
    <dc:creator>ashikuma</dc:creator>
    <dc:date>2020-09-29T20:54:07Z</dc:date>
    <item>
      <title>timeformat are not getting extracted properly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/timeformat-are-not-getting-extracted-properly/m-p/406308#M72098</link>
      <description>&lt;P&gt;timeformat are not getting extracted properly, we have one type of timestamp but clock there is different. It is starting from 0 - 24 hours and date starting from 1- 31, and also same for month 1- 12, see timestamp example below.&lt;/P&gt;

&lt;P&gt;[8/10/18 0:20:37:469 EDT]&lt;BR /&gt;
[8/9/18 11:59:59:796 EDT]&lt;BR /&gt;
[8/9/18 13:16:38:194 EDT]&lt;BR /&gt;
[8/12/18 1:49:08:943 EDT]&lt;BR /&gt;
[8/11/18 22:59:45:370 EDT]&lt;/P&gt;

&lt;P&gt;I tried to use this props.conf but didn't work &lt;/P&gt;

&lt;P&gt;[sourcetypename]&lt;BR /&gt;
BREAK_ONLY_BEFORE = [\d+\/\d+\/\d+\s\d+[:]\d+[:]\d+[:]\d+\s\w{3}]&lt;BR /&gt;
TIME_FORMAT = %m/%e/%y %k:%M:%S:%3N &lt;/P&gt;

&lt;P&gt;After this I tried to extract using datetime.xml, that is working for some extent but not fully. Using that I am getting delay in indexed event timestamp, please help...&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:54:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/timeformat-are-not-getting-extracted-properly/m-p/406308#M72098</guid>
      <dc:creator>ashikuma</dc:creator>
      <dc:date>2020-09-29T20:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: timeformat are not getting extracted properly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/timeformat-are-not-getting-extracted-properly/m-p/406309#M72099</link>
      <description>&lt;P&gt;Not sure why you are using %e instead of %d, nor why you aren't using %Z. I doubt that is what is causing your problem, however.&lt;/P&gt;

&lt;P&gt;Do you have someplace in your props.conf files a directive to use the index time as the timestamp, which could be superseding the above configuration? Look for that sourcetype or other indication of a configuration clause that could be overriding things. You probably should look at using btool. Something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;splunk btool props list --debug 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then look at the output for the sourcetype and see if it is using the configuration you expect it to be using.&lt;/P&gt;</description>
      <pubDate>Sun, 12 Aug 2018 16:03:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/timeformat-are-not-getting-extracted-properly/m-p/406309#M72099</guid>
      <dc:creator>cpetterborg</dc:creator>
      <dc:date>2018-08-12T16:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: timeformat are not getting extracted properly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/timeformat-are-not-getting-extracted-properly/m-p/406310#M72100</link>
      <description>&lt;P&gt;So I decided to play with taking those timestamps and uploading it to my local instance through &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.1.2/Data/Howdoyouwanttoadddata"&gt;the Add Data&lt;/A&gt; page&lt;/P&gt;

&lt;P&gt;Something that was interesting to me, with these dates on my laptop's 7.1.2 instance, it seems like Splunk was getting tripped up by the leading square bracket and or single digit date... which I was able to fix in two different ways... either by specifying a &lt;CODE&gt;TIME_PREFIX = \[&lt;/CODE&gt; or starting your &lt;CODE&gt;TIME_FORMAT&lt;/CODE&gt; with &lt;CODE&gt;[&lt;/CODE&gt;.  If you specify &lt;CODE&gt;TIME_PREFIX&lt;/CODE&gt;, you could also reduce the search space Splunk uses to identify a timestamp by setting &lt;CODE&gt;MAX_TIMESTAMP_LOOKAHEAD&lt;/CODE&gt; down to around 26 or 28. If the timestamp is the first thing in your event, then you could even anchor it with &lt;CODE&gt;TIME_PREFIX = ^\[&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;As @cpetterborg mentions since your data has timezones, you really should be including &lt;CODE&gt;%Z&lt;/CODE&gt; in your format... and I would also encourage use of the more familiar &lt;CODE&gt;%d&lt;/CODE&gt; and &lt;CODE&gt;%H&lt;/CODE&gt;over the &lt;CODE&gt;%e&lt;/CODE&gt; and &lt;CODE&gt;%k&lt;/CODE&gt; equivalences (but the bracket fix it seems to work either way). &lt;/P&gt;

&lt;P&gt;Additionally, if you can guarantee only single line events, I'd encourage making use of &lt;CODE&gt;SHOULD_LINEMERGE = false&lt;/CODE&gt; instead of &lt;CODE&gt;BREAK_ONLY_BEFORE = regex&lt;/CODE&gt; or the default &lt;CODE&gt;BREAK_ONLY_BEFORE_DATE = true&lt;/CODE&gt;. As you have what seems to be an event-breaking regex, you may even consider altering &lt;CODE&gt;LINE_BREAKER&lt;/CODE&gt; to have only single "line" events, but that's assuming that this timestamp is the first thing after a linebreak in your file. (if you go that route you might also need to be aware that &lt;CODE&gt;TRUNCATE&lt;/CODE&gt; has a maximum default 10000 bytes per "line"&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2018 02:24:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/timeformat-are-not-getting-extracted-properly/m-p/406310#M72100</guid>
      <dc:creator>acharlieh</dc:creator>
      <dc:date>2018-08-13T02:24:18Z</dc:date>
    </item>
  </channel>
</rss>

