<?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: [Extract DateTime in event to _time] datetime.xml some formats in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Extract-DateTime-in-event-to-time-datetime-xml-some-formats/m-p/564554#M100513</link>
    <description>&lt;P&gt;I found the error. This is in the configuration of MAX_TIMESTAMP_LOOKAHEAD.&lt;/P&gt;&lt;P&gt;My field is beyong 128 char. So in log, i see Failed to parse timestamp in first MTL (128).&lt;/P&gt;&lt;P&gt;My question : "how configure tow differents MAX_TIMESTAMP_LOOKAHEAD?"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 24 Aug 2021 14:42:33 GMT</pubDate>
    <dc:creator>SuperMisterT</dc:creator>
    <dc:date>2021-08-24T14:42:33Z</dc:date>
    <item>
      <title>[Extract DateTime in event to _time] datetime.xml some formats</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-DateTime-in-event-to-time-datetime-xml-some-formats/m-p/564539#M100508</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have TCP 514 logs in the same sourcetype.&lt;BR /&gt;There are different formats of timestamp in log and even in events.&lt;BR /&gt;I don't understand my mistakes with datetime.xml. It's working for one format but not for the second.&lt;/P&gt;&lt;P&gt;I text regexp with search ( | rex field=_raw ".........") fields are correctly extracted.&lt;/P&gt;&lt;P&gt;I follow thus tuto: &lt;EM&gt;&lt;FONT color="#0000FF"&gt;&lt;A href="https://www.function1.com/2013/01/oh-no-splunking-log-files-with-multiple-formats-no-problem" target="_blank"&gt;https://www.function1.com/2013/01/oh-no-splunking-log-files-with-multiple-formats-no-problem&lt;/A&gt;&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt;&lt;BR /&gt;&lt;U&gt;first log:&lt;/U&gt;&lt;BR /&gt;&amp;lt;111&amp;gt; YYYY-MM-DDTHH:MM:SS+02:00 localhost house 12154 - @ip [&lt;EM&gt;&lt;FONT color="#FF00FF"&gt;DD/LitMM/YYYY:HH:MM:SS.MS&lt;/FONT&gt;&lt;/EM&gt;] ...........&lt;BR /&gt;_time is correctly extract,&lt;/P&gt;&lt;P&gt;&lt;U&gt;second log:&lt;/U&gt;&lt;BR /&gt;&amp;lt;145&amp;gt; YYYY-MM-DDTHH:MM:SS+02:00 localhost foo - - YYYY-MM-DDTHH:MM:SS.MS+0000 jizjfoziejfz battle: cececeijoijoi [&lt;EM&gt;&lt;FONT color="#FF00FF"&gt;YYYY-MM-DDTHH:MM:SS.MS+0000&lt;/FONT&gt;&lt;/EM&gt;] ...........&lt;BR /&gt;_time is not extracted, value is index time &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm on a standalone station, so i copy regexp without storage (maybe typo).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Configuration:&lt;/STRONG&gt;&lt;BR /&gt;&lt;U&gt;in datetime.xml on HeayFW (etc/apps/test/default)&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;lt;define name="_house" extract="day, litmonth,year,hour,minute,second,subsecond"&amp;gt;&lt;BR /&gt;&amp;lt;text&amp;gt;house.*\[(\d{2})/(\w{3})/(\d{4}):(\d{2}):(\d{2}):(\d{2})\.\d+\]&amp;gt;&amp;lt;/text&amp;gt;&lt;BR /&gt;&amp;lt;/define&amp;gt;&lt;BR /&gt;&amp;lt;define name="_battle" extract="year,month,day,hour,minute,second,subsecond"&amp;gt;&lt;BR /&gt;&amp;lt;text&amp;gt;battle.*\[(\d{4})\-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})\.\d+\+\d{4}\]&amp;gt;&amp;lt;/text&amp;gt;&lt;BR /&gt;&amp;lt;/define&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;timePatterns&amp;gt;&lt;BR /&gt;&amp;lt;use name="_house"/&amp;gt;&lt;BR /&gt;&amp;lt;use name="_battle"/&amp;gt;&lt;BR /&gt;&amp;lt;/timePatterns&amp;gt;&lt;BR /&gt;&amp;lt;datePatterns&amp;gt;&lt;BR /&gt;&amp;lt;use name="_house"/&amp;gt;&lt;BR /&gt;&amp;lt;use name="_battle"/&amp;gt;&lt;BR /&gt;&amp;lt;/datePatterns&amp;gt;&lt;BR /&gt;&amp;lt;/datetime&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;in props.conf&lt;/U&gt;&lt;BR /&gt;[my_sourcetype]&lt;BR /&gt;DATETIME_CONGIG= /etc/apps/test/defaults/datetime.xml&lt;BR /&gt;LINE_BREAKER = ([\r|\n])+&lt;BR /&gt;SHOULD_LINEMERGE = false&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 13:40:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-DateTime-in-event-to-time-datetime-xml-some-formats/m-p/564539#M100508</guid>
      <dc:creator>SuperMisterT</dc:creator>
      <dc:date>2021-08-24T13:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: [Extract DateTime in event to _time] datetime.xml some formats</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-DateTime-in-event-to-time-datetime-xml-some-formats/m-p/564547#M100509</link>
      <description>&lt;P&gt;I have not gone through regex in details but I can see that in your datetime.xml, you don't have &lt;STRONG&gt;&amp;lt;datetime&amp;gt; &lt;/STRONG&gt;and in props.conf you have defined &lt;STRONG&gt;defaults &lt;/STRONG&gt;however you have directory called &lt;STRONG&gt;default&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 14:15:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-DateTime-in-event-to-time-datetime-xml-some-formats/m-p/564547#M100509</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2021-08-24T14:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: [Extract DateTime in event to _time] datetime.xml some formats</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-DateTime-in-event-to-time-datetime-xml-some-formats/m-p/564550#M100511</link>
      <description>&lt;P&gt;Yes this is a typo when i copied my screen sorry.....&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 14:26:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-DateTime-in-event-to-time-datetime-xml-some-formats/m-p/564550#M100511</guid>
      <dc:creator>SuperMisterT</dc:creator>
      <dc:date>2021-08-24T14:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: [Extract DateTime in event to _time] datetime.xml some formats</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-DateTime-in-event-to-time-datetime-xml-some-formats/m-p/564551#M100512</link>
      <description>&lt;P&gt;Can you please try below config in datetime.xml?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;datetime&amp;gt;
&amp;lt;define name="_house" extract="day, litmonth, year, hour, minute, second, subsecond"&amp;gt;
&amp;lt;text&amp;gt;&amp;lt;![CDATA[house.*\[(\d{2})/(\w{3})/(\d{4}):(\d{2}):(\d{2}):(\d{2})\.(\d+)\]]]&amp;gt;&amp;lt;/text&amp;gt;
&amp;lt;/define&amp;gt;

&amp;lt;define name="_battle" extract="year, month, day, hour, minute, second, subsecond, zone"&amp;gt;
&amp;lt;text&amp;gt;&amp;lt;!CDATA[battle.*\[(\d{4})\-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})\.(\d+)(\+\d{4})\]]]&amp;gt;&amp;lt;/text&amp;gt;
&amp;lt;/define&amp;gt;

&amp;lt;timePatterns&amp;gt;
&amp;lt;use name="_house"/&amp;gt;
&amp;lt;use name="_battle"/&amp;gt;
&amp;lt;/timePatterns&amp;gt;
&amp;lt;datePatterns&amp;gt;
&amp;lt;use name="_house"/&amp;gt;
&amp;lt;use name="_battle"/&amp;gt;
&amp;lt;/datePatterns&amp;gt;
&amp;lt;/datetime&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 14:53:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-DateTime-in-event-to-time-datetime-xml-some-formats/m-p/564551#M100512</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2021-08-24T14:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: [Extract DateTime in event to _time] datetime.xml some formats</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-DateTime-in-event-to-time-datetime-xml-some-formats/m-p/564554#M100513</link>
      <description>&lt;P&gt;I found the error. This is in the configuration of MAX_TIMESTAMP_LOOKAHEAD.&lt;/P&gt;&lt;P&gt;My field is beyong 128 char. So in log, i see Failed to parse timestamp in first MTL (128).&lt;/P&gt;&lt;P&gt;My question : "how configure tow differents MAX_TIMESTAMP_LOOKAHEAD?"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 14:42:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-DateTime-in-event-to-time-datetime-xml-some-formats/m-p/564554#M100513</guid>
      <dc:creator>SuperMisterT</dc:creator>
      <dc:date>2021-08-24T14:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: [Extract DateTime in event to _time] datetime.xml some formats</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-DateTime-in-event-to-time-datetime-xml-some-formats/m-p/564558#M100514</link>
      <description>&lt;P&gt;You can't configure different MAX_TIMESTAMP_LOOKAHEAD. Have you tried datetime.xml which I have provided?&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 14:51:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-DateTime-in-event-to-time-datetime-xml-some-formats/m-p/564558#M100514</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2021-08-24T14:51:29Z</dc:date>
    </item>
  </channel>
</rss>

