<?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: Non-Padded Milliseconds on Timestamp in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Non-Padded-Milliseconds-on-Timestamp/m-p/463306#M79955</link>
    <description>&lt;P&gt;Thanks for your comment.   I tried both of these configs and neither worked.   The result was the same for both of the examples above with &amp;lt; 3 digits on the millisecond...    &lt;/P&gt;

&lt;P&gt;"2019-10-08T14:47:33:4-04:00"  was transformed into "2019-10-08T14:47:33:400-04:00" &lt;/P&gt;

&lt;P&gt;and &lt;/P&gt;

&lt;P&gt;"2019-10-08T14:47:29:91-04:00"  was transformed into ""2019-10-08T14:47:29:910-04:00" &lt;/P&gt;</description>
    <pubDate>Mon, 21 Oct 2019 16:25:28 GMT</pubDate>
    <dc:creator>darrenfuller</dc:creator>
    <dc:date>2019-10-21T16:25:28Z</dc:date>
    <item>
      <title>Non-Padded Milliseconds on Timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Non-Padded-Milliseconds-on-Timestamp/m-p/463304#M79953</link>
      <description>&lt;P&gt;Hello.. &lt;/P&gt;

&lt;P&gt;Splunk 7.0.5, I have a data source as follows, which has 1, 2 or 3 digit values for millisecond. :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Tue Oct 08 2019 14:47:33 tid="d83af63f5acd9c510bd440d" object="EnterpriseSalesInformation" rule_type="request" domain="SOAPvs" domain="SOAPvs" trace_id="30fb2039-9910-4bd5-b012-3fe63dd874af" time="2019-10-08T14:47:33:4-04:00" 
Tue Oct 08 2019 14:47:29 tid="d83af63f5acd9c180b220fd" object="EnterpriseSalesInformation" rule_type="request" domain="SOAPvs" domain="SOAPvs" trace_id="24c792c0-80ea-476b-95b2-3fe63dd8876c" time="2019-10-08T14:47:29:91-04:00" 
Tue Oct 08 2019 14:47:29 tid="d83af63f5acd9c180bd203d" object="EnterpriseSalesInformation" rule_type="request" domain="SOAPvs" domain="SOAPvs" trace_id="7446787d-76b8-4eca-924f-3fe63dd8c9ed" time="2019-10-08T14:47:29:181-04:00" 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Which i am trying to process using this props.conf: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[teshting]
disabled = false
DATETIME_CONFIG = /etc/apps/teshtapp/local/customdatetime.xml
TIME_PREFIX = time="
# TIME_FORMAT = %Y-%m-%dT%H:%M:%S:%3Q%z
# TIME_FORMAT = %Y-%m-%dT%H:%M:%S:%3N%z
MAX_TIMESTAMP_LOOKAHEAD = 40
LINE_BREAKER = ([\r\n]+)
SHOULD_LINEMERGE = false
TRUNCATE = 1000
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;( You can see from my commented lines, i tried to deal with this using %3Q and %3N to no avail, both caused a ms value of 4 to be 400 and 91 to be 910 )&lt;/P&gt;

&lt;P&gt;In reading other comments on here, i think i need to use a custom datetime.xml file to handle this...   so i wrote customdatetime.xml referenced above in my props.conf and detailed here: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;datetime&amp;gt;
    &amp;lt;define name="test_dateformat" extract="year, month, day"&amp;gt;
        &amp;lt;text&amp;gt;&amp;lt;![CDATA[(\d{4})-(\d{2})-(\d{2})]]&amp;gt;&amp;lt;/text&amp;gt;
    &amp;lt;/define&amp;gt;
    &amp;lt;define name="test_timeformat" extract="hour, minute, second, subsecond, zone"&amp;gt;
        &amp;lt;text&amp;gt;&amp;lt;![CDATA[(\d{2}):(\d{2}):(\d{2}):(\d+)(-\d{2}:\d{2})]]&amp;gt;&amp;lt;/text&amp;gt;
    &amp;lt;/define&amp;gt;
    &amp;lt;timePatterns&amp;gt;
        &amp;lt;use name="test_timeformat" /&amp;gt;
    &amp;lt;/timePatterns&amp;gt;
    &amp;lt;datePatterns&amp;gt;
        &amp;lt;use name="test_dateformat" /&amp;gt;
    &amp;lt;/datePatterns&amp;gt;
&amp;lt;/datetime&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That does not seem to work either.   Where am i going wrong?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2019 18:44:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Non-Padded-Milliseconds-on-Timestamp/m-p/463304#M79953</guid>
      <dc:creator>darrenfuller</dc:creator>
      <dc:date>2019-10-18T18:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: Non-Padded Milliseconds on Timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Non-Padded-Milliseconds-on-Timestamp/m-p/463305#M79954</link>
      <description>&lt;P&gt;Hi darrenfuller, I was reviewing the splunk docs and I would like to suggest the configuration below: &lt;/P&gt;

&lt;P&gt;TIME_FORMAT = %Y-%m-%dT%H:%M:%S:%3Q%:z&lt;BR /&gt;
Where : %:z is to specify hour and minute separated by a colon&lt;/P&gt;

&lt;P&gt;OR &lt;/P&gt;

&lt;P&gt;TIME_FORMAT = %Y-%m-%dT%H:%M:%S:%Q%:z&lt;/P&gt;

&lt;P&gt;%z The timezone offset from UTC, in hour and minute: +hhmm or -hhmm. For example, for 5 hours before UTC the values is -0500 which is US Eastern Standard Time.&lt;BR /&gt;
Examples:&lt;/P&gt;

&lt;P&gt;Use %z to specify hour and minute, for example -0500&lt;BR /&gt;
Use %:z to specify hour and minute separated by a colon, for example -5:00&lt;BR /&gt;
Use %::z to specify hour minute and second separated with colons, for example -05:00:00&lt;BR /&gt;
Use %:::z to specify hour only, for example -05&lt;/P&gt;

&lt;P&gt;Also comment  #MAX_TIMESTAMP_LOOKAHEAD = 40, because maybe splunk is looking for the date/time on a position where this data is not found, because generally the date/time is being on the begin of the log. This is only a suggestion for troubleshooting. If it works, you can try to play with numbers to identify the right characters positions to get this data properly indexed and re-enable it again. &lt;/P&gt;

&lt;P&gt;MAX_TIMESTAMP_LOOKAHEAD = &lt;INTEGER&gt; Specify how far (how many characters) into an event Splunk software should look for a timestamp.&lt;BR /&gt;
This constraint is applied starting from the location positioned by TIME_PREFIX.&lt;/INTEGER&gt;&lt;/P&gt;

&lt;P&gt;For example, if TIME_PREFIX positions a location 11 characters into the event, and MAX_TIMESTAMP_LOOKAHEAD is set to 10, timestamp extraction will be constrained to characters 11 through 20.&lt;/P&gt;

&lt;P&gt;If set to 0 or -1, the length constraint for timestamp recognition is effectively disabled. This can have negative performance implications which scale with the length of input lines (or with event size when LINE_BREAKER is redefined for event splitting).&lt;/P&gt;

&lt;P&gt;I hope this can assist you to fix your issue.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:34:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Non-Padded-Milliseconds-on-Timestamp/m-p/463305#M79954</guid>
      <dc:creator>ivanreis</dc:creator>
      <dc:date>2020-09-30T02:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: Non-Padded Milliseconds on Timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Non-Padded-Milliseconds-on-Timestamp/m-p/463306#M79955</link>
      <description>&lt;P&gt;Thanks for your comment.   I tried both of these configs and neither worked.   The result was the same for both of the examples above with &amp;lt; 3 digits on the millisecond...    &lt;/P&gt;

&lt;P&gt;"2019-10-08T14:47:33:4-04:00"  was transformed into "2019-10-08T14:47:33:400-04:00" &lt;/P&gt;

&lt;P&gt;and &lt;/P&gt;

&lt;P&gt;"2019-10-08T14:47:29:91-04:00"  was transformed into ""2019-10-08T14:47:29:910-04:00" &lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 16:25:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Non-Padded-Milliseconds-on-Timestamp/m-p/463306#M79955</guid>
      <dc:creator>darrenfuller</dc:creator>
      <dc:date>2019-10-21T16:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: Non-Padded Milliseconds on Timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Non-Padded-Milliseconds-on-Timestamp/m-p/463307#M79956</link>
      <description>&lt;P&gt;and my TIME_PREFIX is time="    which only occurs towards the end of these events .    if you start there... 40 characters is more than enough to match these timestamps (which are 27-29 characters in length)&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 16:27:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Non-Padded-Milliseconds-on-Timestamp/m-p/463307#M79956</guid>
      <dc:creator>darrenfuller</dc:creator>
      <dc:date>2019-10-21T16:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: Non-Padded Milliseconds on Timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Non-Padded-Milliseconds-on-Timestamp/m-p/463308#M79957</link>
      <description>&lt;P&gt;I have decided (due to the lack of answers) that this is in fact not possible.   &lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2019 17:46:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Non-Padded-Milliseconds-on-Timestamp/m-p/463308#M79957</guid>
      <dc:creator>darrenfuller</dc:creator>
      <dc:date>2019-11-22T17:46:30Z</dc:date>
    </item>
  </channel>
</rss>

