<?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: Fixed Format Records - Timestamp Extraction Issues in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Fixed-Format-Records-Timestamp-Extraction-Issues/m-p/173545#M34906</link>
    <description>&lt;P&gt;Thanks, Greg. But this doesn't work either &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 07 May 2015 07:51:19 GMT</pubDate>
    <dc:creator>himynamesdave</dc:creator>
    <dc:date>2015-05-07T07:51:19Z</dc:date>
    <item>
      <title>Fixed Format Records - Timestamp Extraction Issues</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Fixed-Format-Records-Timestamp-Extraction-Issues/m-p/173543#M34904</link>
      <description>&lt;P&gt;Guys,&lt;/P&gt;

&lt;P&gt;This is probably a simple answer, but I'm struggling to get it right &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I have events of fixed length - each event is 775 chars long. Fine. Each event is on a new line also.&lt;/P&gt;

&lt;P&gt;The timestamp in the event is in %Y%m format. This timestamp always starts in the 15th character position of the event - 15, 16, 17, 18 = year. 19, 20 = month (i have pasted two events below where timestamp = 201301). I'm happy to snap the day to 01 of the month. I know this is not ideal for Splunk.&lt;/P&gt;

&lt;P&gt;So at index time I set the following in props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_PREFIX=(.){15}
MAX_TIMESTAMP_LOOKAHEAD=6
TIME_FORMAT=%Y%m
SHOULD_LINEMERGE=false
LINE_BREAKER= .{775}()
MAX_DAYS_AGO=3650
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have included max days ago due to the events age.&lt;/P&gt;

&lt;P&gt;But this does not work. I have tried changing the number for time prefix, lookahead, etc to no avail. Attached is a sample of 2 events. If anyone can help me out to get the timestamp extracted, it will be a great day!&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2015 07:18:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Fixed-Format-Records-Timestamp-Extraction-Issues/m-p/173543#M34904</guid>
      <dc:creator>himynamesdave</dc:creator>
      <dc:date>2015-05-07T07:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: Fixed Format Records - Timestamp Extraction Issues</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Fixed-Format-Records-Timestamp-Extraction-Issues/m-p/173544#M34905</link>
      <description>&lt;P&gt;I would try setting:&lt;/P&gt;

&lt;P&gt;TIME_PREFIX = (.){14}&lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD = 21&lt;/P&gt;

&lt;P&gt;Given that the timestamp begins on the 15th character so there would only be 14 characters prefix and I think you ought to lookahead to at least the character position marking the end of the timestamp.&lt;/P&gt;

&lt;P&gt;Cheers, Greg.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 19:51:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Fixed-Format-Records-Timestamp-Extraction-Issues/m-p/173544#M34905</guid>
      <dc:creator>gwiley_splunk</dc:creator>
      <dc:date>2020-09-28T19:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: Fixed Format Records - Timestamp Extraction Issues</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Fixed-Format-Records-Timestamp-Extraction-Issues/m-p/173545#M34906</link>
      <description>&lt;P&gt;Thanks, Greg. But this doesn't work either &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2015 07:51:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Fixed-Format-Records-Timestamp-Extraction-Issues/m-p/173545#M34906</guid>
      <dc:creator>himynamesdave</dc:creator>
      <dc:date>2015-05-07T07:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: Fixed Format Records - Timestamp Extraction Issues</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Fixed-Format-Records-Timestamp-Extraction-Issues/m-p/173546#M34907</link>
      <description>&lt;P&gt;Ok.&lt;/P&gt;

&lt;P&gt;I meant to mention this earlier but try anchoring the TIME_PREFIX. I.e.&lt;/P&gt;

&lt;P&gt;TIME_PREFIX = ^(.){14}&lt;/P&gt;

&lt;P&gt;Cheers, Greg.&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2015 07:52:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Fixed-Format-Records-Timestamp-Extraction-Issues/m-p/173546#M34907</guid>
      <dc:creator>gwiley_splunk</dc:creator>
      <dc:date>2015-05-07T07:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: Fixed Format Records - Timestamp Extraction Issues</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Fixed-Format-Records-Timestamp-Extraction-Issues/m-p/173547#M34908</link>
      <description>&lt;P&gt;I like your perseverance, but still no luck. I feel like Splunk is just rejecting the timestamp because it has no day.&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2015 07:55:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Fixed-Format-Records-Timestamp-Extraction-Issues/m-p/173547#M34908</guid>
      <dc:creator>himynamesdave</dc:creator>
      <dc:date>2015-05-07T07:55:43Z</dc:date>
    </item>
  </channel>
</rss>

